Documentation
¶
Overview ¶
Package terminaltext provides terminal-safe plain-text rendering helpers for mecatui UI and status-line renderers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NormalizeWidth ¶
NormalizeWidth rewrites text so Lip Gloss's WcWidth and GraphemeWidth agree for every grapheme cluster. It preserves agreeing clusters, then tries removing VS16, keeping the first scalar, and finally U+FFFD.
func Sanitize ¶
Sanitize removes terminal controls from plain text while preserving layout newlines and tabs. It removes C0 controls, ESC, DEL, C1 controls, and Unicode Cf format characters. Markdown must not pass through this function.
func SanitizeSingleLine ¶
SanitizeSingleLine removes terminal controls from a single-line display value. Unlike Sanitize, it removes layout newlines, tabs, U+2028, and U+2029.
Types ¶
This section is empty.