Skip to main content

extract_headers

Function extract_headers 

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

Extract headers from markdown content for table of contents.

Fenced code blocks are skipped so a ## Setup inside a sample does not become a TOC entry linking to an anchor the renderer never emits. Mirrors the fence handling in the docs-kit search splitter and build-time anchor validator.