Skip to main content

extract_first_heading

Function extract_first_heading 

Source
pub fn extract_first_heading(content: &str) -> Option<String>
Expand description

Extract the first H1 heading from markdown content using AST parsing.

Returns the heading text with original case preserved, or None if no # Heading is found. Only matches depth-1 headings (#, not ##).