Skip to main content

split_markdown_sections

Function split_markdown_sections 

Source
pub fn split_markdown_sections(content: &str) -> Vec<(String, String)>
Expand description

Parse a markdown file into (heading_breadcrumb, body) section pairs.

Each ATX heading (#, ##, …) starts a new section. The breadcrumb is built by joining the heading hierarchy with >. The root section (text before the first heading) uses an empty breadcrumb.