Skip to content

fix(animate): animate inline code during streaming - #595

Merged
farnabaz merged 2 commits into
mainfrom
fix/issue-594-animate-inline-code
Aug 24, 2026
Merged

fix(animate): animate inline code during streaming#595
farnabaz merged 2 commits into
mainfrom
fix/issue-594-animate-inline-code

Conversation

@farnabaz

Copy link
Copy Markdown
Collaborator

Summary

  • Drop bare code from the animate plugin's SKIP_TAGS, keeping pre / svg / math / annotation.
  • Inline backtick spans now get the same per-word data-sd-animate fade-in as surrounding prose.
  • Fenced/highlighted blocks stay un-split because CommonMark always emits pre > code.
  • Update docs + unit tests; add changeset.

Fixes #594

Test plan

  • pnpm exec vitest run __tests__/animate.test.ts __tests__/animate-issues.test.tsx (71 passed)
  • Stream markdown with mixed inline code and fenced blocks under animated + isAnimating
  • Confirm inline code fades with prose; fenced Shiki blocks still appear as a unit
  • Spot-check math / mermaid / svg are still un-animated

Skip the animate visitor on pre (and svg/math/annotation) only — not bare
code. Fenced/highlighted blocks stay un-split via their pre ancestor; inline
backtick spans now get the same per-word fade-in as surrounding prose.

Fixes #594
@vercel

vercel Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
streamdown Ready Ready Preview, v0 Aug 24, 2026 10:02am

@farnabaz
farnabaz merged commit 6ec3c48 into main Aug 24, 2026
11 checks passed
@farnabaz
farnabaz deleted the fix/issue-594-animate-inline-code branch August 24, 2026 10:06
lofcz added a commit to lofcz/streamdown-ng that referenced this pull request Aug 24, 2026
Keep the fork's animation timeline, animateCodeBlocks path, and ControlsConfig in streamdown-context. Take unique upstream bits: inline-code animation (vercel#595), configurable download filenames (vercel#559), and table csvSeparator (vercel#524).

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Animated streaming skips inline code — skip check should key off pre instead of code

1 participant