Skip to main content

extract_headings

Function extract_headings 

Source
pub fn extract_headings(document: &Html) -> Vec<Heading>
Expand description

从 HTML 文档中提取所有标题(h1 - h6)

返回按文档顺序排列的标题列表,包含层级、文本、ID 和 class 信息。