Skip to main content

Module parse

Module parse 

Source
Expand description

Markdown source to AST. The entry point is the free parse function, which reads the crate’s one syntax. Parsing is tolerant: problems are collected as Diagnostics rather than aborting.

Structs§

Definitions
The link reference definitions an inline parse resolves references against: they decide whether [a][b], [a][], and [a] are reference links or images.
InlineOutput
The result of an inline parse: the inlines, the tokens of the text, and any diagnostics.
InlineSource
The inline content the parser read for one paragraph or heading, from Document::inline_source, with where each of its offsets sits in the document’s source.
InlineToken
A run of the text of an inline parse: the innermost inline that holds it, as its index in InlineOutput::nodes, and the part of that inline it is.
ParseOutput
The result of a tolerant parse: the document plus any diagnostics gathered along the way (empty on a clean parse).

Enums§

TokenRole
The part of an inline a token is.

Functions§

parse
Parse input. Infallible and tolerant: problems are reported as diagnostics in the returned ParseOutput.
parse_inline
Parse text as the inline content of one leaf block, with the same syntax as parse and no block rule: # a and - a stay text. A reference forms only for a label definitions holds. Infallible, like parse; a leading U+FEFF is content.