Expand description
The shared Layout → HTML renderer.
Every HTML-producing host — the CLI today, vertext-wasm tomorrow — goes
through this crate, so the slot-to-class mapping and the mode protocol are
defined exactly once. The crate is wasm32-clean: no I/O, strings in,
strings out.
Structs§
Constants§
- CELL_
SEP - CODE_
LATIN_ CAP - MAX_
HEADING_ LEVEL - MODE_
CODE - Reserved private-use markers that the Quarto filter inserts around a segment so a single invocation can switch mid-stream between rule sets. Source authors never type these, which is why they live in the Unicode Private Use Area.
- MODE_
HEADING_ BASE - Heading levels 1–6 occupy U+E002–U+E007.
- MODE_
LIST - One list item. Each item is its own segment: flattening a whole list into a single blob welds the items together and mixes their scripts, so a list of mostly-CJK items with Latin terms in them gets classified by the aggregate rather than item by item.
- MODE_
LIST_ ORDERED - One item of a numbered list. Ordered items already carry their number in the text, so they must not also be given a bullet; a marker of their own is what lets the stylesheet tell them apart.
- MODE_
PROSE - MODE_
TABLE - A table segment. Within it, cells are separated by
CELL_SEPand rows byROW_SEP; a table is 2-D and the wire is a flat string, so the structure needs separators rather than a mode alone. - PROSE_
LATIN_ CAP - Single source of truth for the Latin slot caps. The renderer publishes them to CSS as custom properties on the root element, so the stylesheet never hardcodes a width that could drift from the layout.
- RESERVED_
END - One past the last reserved codepoint. The filter strips this whole range from author text; keep the two in step.
- ROW_SEP
Functions§
- code_
config - column_
advance - Exposes the advance keyword for hosts that render their own shell.
- escape
- heading_
marker - The marker introducing a heading of
level(clamped to 1–6). - prose_
config - render_
document - Renders one
.vertextstrip to HTML.