Skip to content

HtmlParserModule

Defined in: parse/registry.ts:89

HTML parser module for handling hast elements.

Parser modules are first-class modules that live in src/parse/. They handle specific HTML tags and emit SpecAST nodes.

handles: string[]

Defined in: parse/registry.ts:94

Tag names this parser handles (e.g., [‘h1’, ‘h2’, ‘h3’, ‘h4’, ‘h5’, ‘h6’])


name: string

Defined in: parse/registry.ts:91

Unique parser module name


optional order: number

Defined in: parse/registry.ts:100

Order for deterministic dispatch. Lower numbers run first. Default is 10.

optional handleBlock(element, ctx): BlockHandlerResult

Defined in: parse/registry.ts:103

Handle a block-level element

Element

ParseContext

BlockHandlerResult


optional handleInline(element, ctx): InlineHandlerResult

Defined in: parse/registry.ts:106

Handle an inline-level element

Element

ParseContext

InlineHandlerResult