Skip to content

fix(streamdown): disable singleTilde in remark-gfm to prevent ~ from rendering as strikethrough#546

Open
sleitor wants to merge 1 commit into
vercel:mainfrom
sleitor:fix-545
Open

fix(streamdown): disable singleTilde in remark-gfm to prevent ~ from rendering as strikethrough#546
sleitor wants to merge 1 commit into
vercel:mainfrom
sleitor:fix-545

Conversation

@sleitor

@sleitor sleitor commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #545

Single tilde (~foo~) was incorrectly rendered as strikethrough because remark-gfm defaults to singleTilde: true. This PR sets singleTilde: false in the default remark-gfm configuration, consistent with GitHub GFM behavior where only double tildes (~~text~~) create strikethrough.

Changes

  • packages/streamdown/index.tsx: Changed default remarkGfm options from {} to { singleTilde: false }
  • packages/streamdown/__tests__/single-tilde.test.tsx: Added tests verifying single ~ is not rendered as strikethrough while ~~ still works
  • .changeset/fix-single-tilde-545.md: Changeset for patch release

Testing

  • All 985 existing tests pass
  • 3 new tests added specifically for single tilde behavior

…rendering as strikethrough

Set singleTilde: false in the default remark-gfm configuration so that
single ~ characters are not interpreted as strikethrough markup. Only
double tildes (~~text~~) will trigger strikethrough, consistent with
GitHub GFM behavior.

Fixes vercel#545
@vercel

vercel Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

@sleitor 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.

Single tilde ~ incorrectly rendered as strikethrough (no way to configure singleTilde: false)

1 participant