parseMarkdown
function parseMarkdown(lines, options?): DocumentNode;Defined in: index.ts:146
Same as contentFromMarkdown but accepts an array (not variadic) plus
options. Each registered descriptor’s fromMarkdown is given a chance to
claim every input line (in registration order) before the built-in
parser runs. The first descriptor to return a non-null result wins.
Fenced code (```) is consumed by built-in logic before custom
descriptors get a peek — the built-in handles the multi-line collection
and would otherwise interleave awkwardly with line-by-line custom
matchers. Custom descriptors can still claim arbitrary multi-line shapes
(e.g., a 3-line callout block) by returning consumed > 1; the parser
advances accordingly.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
lines | readonly string[] |
options? | { blocks?: BlockDescriptor[]; } |
options.blocks? | BlockDescriptor[] |
Returns
Section titled “Returns”DocumentNode