Skip to main content

extract_toc

Function extract_toc 

Source
pub fn extract_toc(body: &str) -> Vec<TocEntry>
Expand description

Extract the TOC (h2/h3 with anchor ids) from a rendered body. h1 is the page title and stays out of the TOC; deeper levels rarely carry anchors worth listing.