read_wikitext: Read Wikitext

Description Usage Arguments Examples

View source: R/read.R

Description

Initially reads and parses a pile of wikitext, turning it into an object that can have elements extracted from it.

Usage

1
read_wikitext(wikitext, skip_styles = FALSE)

Arguments

wikitext

a pile of wikitext, as a string.

skip_styles

whether to skip style tags, which (very occasionally) cause parsing problems. FALSE by default.

Examples

1
2
3
4
5
6
## Not run: 
# Simple example
raw_wikitext <- "==this is a header==\n with {{a|template}}"
wikitext <- read_wikitext(raw_wikitext)

## End(Not run)

Ironholds/mwparser documentation built on Aug. 2, 2017, 1:24 p.m.