Skip to content

UnitParser

Defined in: parse/types.ts:21

Interface for format-specific unit parsers

Both markdown and HTML parsers implement this interface, allowing the orchestrator to route units to the correct parser.

readonly format: SourceFormat

Defined in: parse/types.ts:23

Format this parser handles

parse(unit): (Section | Block)[]

Defined in: parse/types.ts:31

Parse a source unit into AST blocks

SourceUnit

Source unit to parse

(Section | Block)[]

Array of top-level blocks/sections