Streaming Parser Improvements
Streamdown v2.5 enhances markdown parsing for real-time streaming scenarios. The new inlineKatex option automatically completes inline formulas (e.g., $formula becomes $formula$) during streaming, preventing ambiguity with currency symbols. This defaults to false for backward compatibility.
Block KaTeX handling is also improved, fixing cases where streaming produces partial closing delimiters. Additionally, single tildes between word characters (e.g., 20~25°C) are now escaped by default to prevent false strikethrough rendering, controlled via the new singleTilde option.
Animation and Rendering Enhancements
Staggered streaming animations now cascade sequentially instead of animating all content simultaneously. The timing is configurable via the new stagger option (default 40ms), allowing fine-tuned control over animation sequences. Set stagger: 0 to restore previous behavior.
Code blocks received several improvements: custom renderers now access the raw metastring via a new optional meta prop, and the lineNumbers prop enables toggling line number display. Long lines now scroll horizontally instead of being clipped, completed blocks no longer re-render when new content arrives, and unknown language identifiers gracefully fall back to plain text highlighting.
Bug Fixes and Compatibility
The CSV export function (save()) now prepends a UTF-8 BOM for proper Windows Excel encoding detection. Tailwind CSS compatibility is enhanced by replacing v4-only *:last: / *:first: syntax with arbitrary variant equivalents, fixing caret rendering in Tailwind v3.
Developers using Streamdown in AI-powered applications can upgrade immediately—the changes are largely additive with sensible defaults preserving existing behavior.