fix(markdown): don't strikethrough single-tilde text (#154)#240
Conversation
…o-Code-Org#154) remark-gfm treats a single ~ around text (e.g. "~10", "1~3") as strikethrough, unlike VS Code's markdown. Pass { singleTilde: false } so only "~~text~~" renders as strikethrough. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Summary
Fixes #154. Text like
1. Lorem ~10 ipsum dolor sit 1~3 amet.was rendered with the middle struck through, becauseremark-gfmtreats a single~around text as strikethrough. VS Code's own markdown does not.Fix
Pass
{ singleTilde: false }toremark-gfminMarkdownBlock.tsx, so only~~text~~(double tilde) renders as strikethrough. Single tildes around numbers/words are left as literal text.Testing
Added tests: single-tilde input produces no
<del>(and keeps~10/1~3literally), while~~struck~~still renders a<del>.