Expand description
Block-level markdown parser → MdBlock sequence.
Parses a multi-line string into a flat list of block-level elements.
For blocks that carry inline text (headings, paragraphs, blockquotes,
list items) the text is forwarded to super::inline::parse_inline_markdown
to produce the final crate::ast::node::TextSpan spans.
§Supported block syntax
| Syntax | Produces |
|---|---|
# … … ###### … | Heading { level: 1..=6, … } |
| Two or more consecutive non-blank | Paragraph { … } |
> … (consecutive) | Blockquote { … } |
- / * / + prefix | ListItem { kind: Unordered, … } |
1. / 2. … prefix | ListItem { kind: Ordered, … } |
``` … ``` (fenced) | CodeBlock { lang, content } |
--- / *** / ___ / - - - … | HorizontalRule |
§Non-goals (V1)
Setext headings, nested blockquote trees, true list-tree nesting, GFM
tables, reference links, HTML blocks, indented (4-space) code blocks, and
task checkboxes are not recognised; they degrade to Paragraph or the
nearest applicable block kind.
Enums§
Functions§
- parse_
block_ markdown - Parse a markdown document into a flat list of
MdBlocks.