Skip to main content
Version: v0.0.4

Interface: RenderedText

The normalized display model produced by renderText: a flat plain-text string plus the structured highlight-aware runs, plus an honesty list of the escape sequences that were preserved rather than rendered.

Properties

runs

readonly runs: readonly TextRun[]

The structured, highlight-aware form: { text, highlighted } runs in document order. Empty runs are elided. Use this to preserve emphasis (bold / reverse-video / etc.) that the flat text drops.


text

readonly text: string

The full plain-text normalization: formatting commands become whitespace / line breaks and highlight boundaries are dropped. This is the string to show a human or feed a downstream .text. Equal to the concatenation of every runs entry's text.


unrenderedSequences

readonly unrenderedSequences: readonly string[]

The escape sequences renderText preserved verbatim instead of rendering: vendor \Zdddd…\, charset switches \Cxxyy/\Mxxyyzz, and any malformed / unterminated sequence. Their literal characters ALSO appear in text/runs (never silently dropped); this list exists so a consumer can detect that a non-render decision was made and surface or route those sequences deliberately. Empty when everything rendered cleanly.