Skip to main content

structure_of

Function structure_of 

Source
pub fn structure_of(text: &str) -> Vec<StructureNode>
Expand description

Reads the heading structure of a markdown document.

Pure and total: a document with no headings has no structure, which is a fact about the document rather than a failure. Fenced code blocks are skipped, because a # comment inside a shell example is not a heading and a structure tree that says otherwise would send a reader to a line that does not exist.