md_to_xml | R Documentation |
Parses (R) Markdown file content according to the CommonMark specification and returns it as an XML parse tree.
md_to_xml(
md,
smart_punctuation = FALSE,
hardbreaks = FALSE,
normalize = TRUE,
sourcepos = FALSE,
footnotes = TRUE,
extensions = c("strikethrough", "table", "tasklist"),
eol = c("LF", "CRLF", "CR", "LFCR"),
strip_xml_ns = TRUE
)
md |
(R) Markdown file content as a character scalar. |
smart_punctuation |
Whether or not to enable Pandoc's |
hardbreaks |
Whether or not to treat newlines as hard line breaks. |
normalize |
Consolidate adjacent text nodes. |
sourcepos |
Include source position attribute in output. |
footnotes |
parse footnotes |
extensions |
Enables Github extensions. Can be |
eol |
End of line (EOL) control character sequence. One of
|
strip_xml_ns |
Whether or not to remove the default XML namespace ( |
An xml_document
.
Other CommonMark parsing functions:
md_xml_subnode_ix()
,
xml_to_md()
"# A title
Some prose.
## A subtitle
More prose.
## Another subtitle
Out of prose here.
### A sub-subtitle
I'm dug in.
# Another title
A last word." |> pal::md_to_xml()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.