Skip to main content

parse

Function parse 

Source
pub fn parse(content: &str) -> ParsedDocument
Expand description

Parse a markdown document, extracting frontmatter and body.

If the content starts with ---\n, the YAML frontmatter is extracted and deserialized into a HashMap. The body is everything after the closing --- delimiter (preserved byte-for-byte).

If no frontmatter is found, returns an empty map with the full content as body.