pub struct ParserReturn<'a> {
pub root: Root<'a>,
pub diagnostics: Vec<Diagnostic>,
pub blanks: Vec<Span>,
}Expand description
The outcome of a parse: an AST plus diagnostics.
Parsing never fails. CommonMark has no syntax errors, and MDX-mode errors are reported here while the parse recovers.
Fields§
§root: Root<'a>§diagnostics: Vec<Diagnostic>§blanks: Vec<Span>Every logical blank line, in source order:
the span after the container prefixes (empty for a bare > line inside a blockquote),
up to the line ending.
Lines inside fenced blocks are content, never listed;
blank lines inside indented code are listed (they are only content if more code follows),
consumers compare against node spans.
Blank runs between siblings carry meaning (HTML verbatim boundaries, loose lists);
exposing the table the block phase already built saves consumers a container-aware rescan.
(List tightness itself is already on crate::ast::List::tight,
computed from the subset that can loosen a list.)