Skip to main content

Module parse

Module parse 

Source
Expand description

Markdown source turned into an owned tree, before anything is drawn.

Rendering straight from the event stream would mean deciding a block’s layout before its contents are known, and would leave nothing for a test to assert against but pixels. The tree is the seam: parsing is pure and testable on its own, truncation is arithmetic over it, and the renderer only ever walks a finished structure.

Raw HTML survives parsing as Block::Html and Inline::Html. It is never interpreted and never discarded, because a document that could delete its own content from the reader’s view by wrapping it in a tag would be a document nobody could trust.

Structs§

Document
A parsed document.
ListEntry
One entry of a bulleted or numbered list.

Enums§

Block
One block of a document.
CellAlign
Which way a table column’s cells are set.
Inline
A run of content inside one line of prose.