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.
Properties
Section titled “Properties”handles
Section titled “handles”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
order?
Section titled “order?”
optionalorder:number
Defined in: parse/registry.ts:100
Order for deterministic dispatch. Lower numbers run first. Default is 10.
Methods
Section titled “Methods”handleBlock()?
Section titled “handleBlock()?”
optionalhandleBlock(element,ctx):BlockHandlerResult
Defined in: parse/registry.ts:103
Handle a block-level element
Parameters
Section titled “Parameters”element
Section titled “element”Element
Returns
Section titled “Returns”handleInline()?
Section titled “handleInline()?”
optionalhandleInline(element,ctx):InlineHandlerResult
Defined in: parse/registry.ts:106
Handle an inline-level element
Parameters
Section titled “Parameters”element
Section titled “element”Element