Skip to main content

Module node

Module node 

Source
Expand description

Block-level and inline-level AST nodes.

Closed enums; pattern matching is the visitor framework. The variants model every construct super::parser::parser_options turns on — CommonMark plus the GFM tables, strikethrough, footnotes and task lists moss enables (ADR-035 § Task lists, amended) — so nothing pulldown-cmark emits for those constructs reaches a catch-all.

Block::Other / Inline::Other are NOT a general catch-all. They carry raw HTML onlyTag::HtmlBlock and Event::Html/InlineHtml in super::parser — plus payloads moss synthesizes itself (math, ADR-030; dispatched wikilink embeds). Anything pulldown-cmark emits that has no arm is dropped, not passed through: parse_block, parse_block_with_tag and parse_inline all end in _ => (None, 1), and parse_inline_event’s whitelist ends in _ => None.

So turning on a new Options bit is never a one-line flag flip. It needs a variant here PLUS arms in parse_block_with_tag / parse_inline / parse_inline_event’s whitelist, in the same change, or the construct silently disappears from published pages. That is not hypothetical: before ADR-035, ~~ was a construct the AST hadn’t modeled and it did not flow through Inline::Other~~gone~~ stays published gone stays for two months. See ADR-035 § Why now.

Enums§

Block
A block-level AST node.
CalloutKind
Canonical callout kind. Obsidian-dialect aliases canonicalize via CalloutKind::from_raw (e.g. tldr/summaryCalloutKind::Abstract). Unknown kinds fall back to CalloutKind::Note; the parser logs at trace level (Diagnostic threading is a Phase 4 followup — see validation::Diagnostic, today scoped to frontmatter validation).
ColumnAlignment
Per-column table alignment declared in GFM source (|:--| left, |:-:| center, |--:| right; a bare |---| is ColumnAlignment::None).
Fold
Foldable callout state. > [!type]+Fold::Open (foldable, open by default); > [!type]-Fold::Closed (foldable, closed by default). Non-foldable callouts have fold: None on the containing Block::Callout.
Inline
An inline-level AST node.