md_xml_subnode_ix | R Documentation |
Determines the XML children node indices for every XML node at the highest level of xml
by interpreting Markdown heading levels (1–6).
md_xml_subnode_ix(xml)
xml |
CommonMark parse tree. An |
commonmark::markdown_xml()
(and so md_to_xml()
which builds upon it) do parse (R) Markdown file content according to the
CommonMark specification, but do not return any information about the document's heading hierarchy.
md_xml_subnode_ix()
fills this gap by giving the hierarchy structure in the form of the XML subnode indices for every node at the highest level of xml
.
A list of integer vectors of the same length as the number of XML nodes at the highest level of xml
.
Other CommonMark parsing functions:
md_to_xml()
,
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() |>
pal::md_xml_subnode_ix()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.