Skip to content

fix: Optimize code block rendering in streaming mode to prevent unnecessary re-renders#436

Open
WTW0313 wants to merge 1 commit intovercel:mainfrom
WTW0313:fix/code-block-rerender-issue
Open

fix: Optimize code block rendering in streaming mode to prevent unnecessary re-renders#436
WTW0313 wants to merge 1 commit intovercel:mainfrom
WTW0313:fix/code-block-rerender-issue

Conversation

@WTW0313
Copy link

@WTW0313 WTW0313 commented Mar 6, 2026

Description

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Performance improvement
  • Refactoring (no functional changes)

Related Issues

Fixes #435

Changes Made

  • Extract the inline default values for linkSafety into module-level constants (defaultLinkSafetyConfig)

Testing

  • All existing tests pass
  • Added new tests for the changes
  • Manually tested the changes

Test Coverage

Screenshots/Demos

streamdown-demo.mp4

Checklist

  • My code follows the project's code style
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have created a changeset (pnpm changeset)

Changeset

  • I have created a changeset for these changes

Additional Notes

@vercel
Copy link
Contributor

vercel bot commented Mar 6, 2026

@WTW0313 is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

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.

Duplicate rendering of code blocks in streaming mode

1 participant