On 02/06/2015 3:40 PM, Jeroen Ooms wrote: > On Tue, Jun 2, 2015 at 8:42 PM, Duncan Murdoch <murdoch.dun...@gmail.com> > wrote: >> Several of us have been talking about this, and have more or less decided >> against pandoc for the within-R version. It is too hard to build, or to >> include with R, on weird platforms. Something like commonmark is more >> likely. We'd also like to separate the parse and render steps. > > The commonmark::markdown_xml function gives the parse tree in xml > format. From there we could use something like xpath to query the > content for individual news items and such. I think this is a more > practical way of exposing the syntax tree than deeply nested lists or > an external pointer to the internal C handle. >
I'd rather avoid adding a dependence on the XML package; it's not a base or recommended package, so most people don't have it. Base R doesn't have any XML processing built in. One nice thing about the commonmark library is that it is self-contained, so we can add it to R without pulling in a lot of other stuff. Using it to translate Markdown to XML loses that. Duncan Murdoch ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel