Expand description
Styled text runs.
A Span is a byte range over some rendered text plus the style to
draw it with. Spans are the single currency between the parsers
(markdown, the mIRC compat shim) and the layout engine: whatever the
input vocabulary, the output is always a ParsedText.
The important property is that styling is resolved once, at
append. xtext re-ran its mIRC state machine over every visible byte
on every render pass (gtk_xtext_render_str, xtext.c:3292) and
separately built an ent->slp run list at append that the render path
then ignored. Here there is one representation, produced once.
Structs§
- Attrs
- Text attribute bits. A plain
u8rather than abitflagsdependency — there are six of them and they never leave this crate untyped. - Link
- A resolved hyperlink.
- Parsed
Text - The output of every parser in this crate.
- Span
- A styled run: a byte range over the owning text, plus its style.
- Style
- How a run of text is drawn.
Enums§
- Color
Ref - Where a colour comes from.
Type Aliases§
- LinkId
- Index into
ParsedText::links.