Expand description
Plain-text conversion with reference-style URL preservation.
Links are not stripped to their domain, nor expanded inline. Instead each
distinct URL is assigned a stable index and the anchor text is followed by
a compact [N] marker. The full URLs are collected into a reference list
that callers can append to the output or expose separately, so the agent
sees [1] inline (≈1 token) but can still recover the exact link.
Functions§
- html_
to_ text_ with_ refs - Convert an HTML document to reference-style plain text.
- render_
references - Render a reference list into the canonical block appended to text output.
Thin wrapper over
crate::refs::render_block.