Skip to content

buildSectionHierarchy

buildSectionHierarchy(blocks): (Section | Block)[]

Defined in: packages/speculator/src/parse/assembler.ts:72

Build section hierarchy from flat blocks

Converts headings to sections and nests content based on heading depth. Pre-existing sections (from HTML) are inserted at their natural position.

(Section | Block)[]

(Section | Block)[]