Open maelle opened 5 years ago
stylesheet <- xml2::read_xml("https://raw.githubusercontent.com/ropenscilabs/tinkr/master/inst/extdata/xml2md.xsl") doc <- readLines("https://raw.githubusercontent.com/ropensci/roweb2/master/content/blog/2013-11-21-rgbif-changes.md", encoding = "UTF-8") doc <- commonmark::markdown_xml(doc) doc <- xml2::read_xml(doc) output <- xslt::xml_xslt(doc, stylesheet) regmatches(output, regexpr(".partements", output)) #> [1] "©partements" regmatches(toString(doc), regexpr(".partements", toString(doc))) #> [1] "épartements"
Created on 2018-09-17 by the reprex package (v0.2.0).
Created on 2018-09-17 by the reprex package (v0.2.0).