The CommonMark specification defines a rationalized version of markdown syntax. This package uses the libcmark reference implementation for converting markdown text into various formats including html, latex and groff man. In addition it exposes the markdown parse tree in xml format.
About the R package:
Other resources:
library(commonmark)
# Get some markdown data
md <- readLines(curl::curl("https://raw.githubusercontent.com/yihui/knitr/master/NEWS.md"))
# Convert it into formats formats
html <- markdown_html(md)
xml <- markdown_xml(md)
man <- markdown_man(md)
tex <- markdown_latex(md)
cm <- markdown_commonmark(md)