Expand description
Text rendering shared by the CLI and the MCP server: HTML → text and quoted-history stripping. Pure functions, no terminal assumptions.
Enums§
- Link
Style - How
<a href>spans are rendered.
Functions§
- collapse_
blank_ runs - Collapse runs of 3+ blank lines down to 2, and strip tracking-pixel padding characters that marketing emails use to distort preview-pane summaries: zero-width non-joiner (U+200C), zero-width space (U+200B), hair space (U+200A), and combining grapheme joiner (U+034F).
- render_
html - Render an HTML body to text.
- strip_
controls - Removes control characters from third-party text before it can reach a
terminal: everything
char::is_controlmatches (C0, DEL, C1) except\n,\rand\t. An e-mail can otherwise carryESC ] 8 ; ;to forge a hyperlink, move the cursor over earlier lines, retitle the window, or write the clipboard. Applied where Graph data becomespidge-coretypes, and again on rendered HTML (entities decode late). - strip_
quoted_ history - Cut a plain-text body at the first sign of quoted history: an Outlook
header block (
From:followed within three lines bySent:/Subject:), anOn … wrote:line, or the first run of>-quoted lines.