pub enum Container {
ListItem {
ordered: bool,
start: u64,
ordinal: u64,
},
Quote,
Unknown {
tag: String,
attrs: Value,
},
}Expand description
A container a line nests inside. The ancestor path is a Vec<Container>.
Open, on LineKind’s terms: an unrecognized container round-trips as
Container::Unknown and projects transparently — its lines render at the
enclosing level, with no prefix, no wrapper, and no grouping of their own.
Variants§
ListItem
A list item. ordered distinguishes 1. from -; start is the list’s
first number (1 by default); ordinal is this item’s 0-based index in
its list. Two adjacent lines belong to the same item iff their whole
container path (ordinals included) is equal — so a multi-paragraph item
is two lines sharing one ListItem, while the next item differs by
ordinal. (Identity is path plus contiguity: two sibling inner lists
under one outer item can produce equal first-item paths, distinguished
only by the non-adjacency of their runs.) Positional and deterministic —
no minted ids.
Quote
A block quote. Adjacent lines sharing [Quote] are one multi-paragraph
quote; two adjacent separate quotes are not distinguished (they merge on
round-trip — a documented canonicalization).
Unknown
Open-set escape hatch — a container this build does not know, kept in the
path so it round-trips, transparent to both projections. Two adjacent
lines sit in the same one iff their whole (tag, attrs) is equal, the
path-plus-contiguity rule the known containers use.