Description Usage Arguments Value See Also Examples
Some wikimarkup elements (wikilinks or text,
say) have chunks visible when parsed into HTML by MediaWiki.
get_displaytext
retrieves the visible element
for each node in a list of nodes.
1 | get_displaytext(nodes, as_text = FALSE)
|
nodes |
a list of nodes, retrieved with |
as_text |
whether to return the visible element of each node as text rather than a Wikimarkup object. FALSE by default. |
a list of either wikimarkup objects or strings, depending
on the value of as_text
. For nodes without a certain
display element (for example, templates), NA
will be returned.
get_dest
to retrieve the link destination
in the case of internal or external links.
1 2 3 4 5 6 7 8 9 10 11 12 | ## Not run:
library(magrittr)
library(mwparser)
raw_wikitext <- "==this is a header=="
text <- read_wikitext(raw_wikitext) %>%
get_nodes(types = "headings") %>%
get_displaytext
text
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.