Repository navigation
Add tests for NO-BREAK SPACE next to CJK in Markdown - #20321
Conversation
The extra space reported in prettier#8701 no longer happens. Add tests so that U+00A0 next to Chinese stays unchanged with every proseWrap value. Closes prettier#8701 Co-Authored-By: Claude Opus 5.5 <[email protected]>
✅ Deploy Preview for prettier ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
About the AgentScan note: I write my changes with Claude Code as an assistant, and it also runs the git and gh commands, which is why the fork, push and PR came seconds apart. I went through the tests and the results below before opening the PR. This PR only adds On this branch (1b52b72), |
|
Do you know which commit fixed it? |
commit: |
|
It was #11597 (ebb8e13, "Markdown: improve whitespace handling in CJK"), released in 3.0.0. With the input from #8701, |
Description
Closes #8701.
The extra space reported in #8701 (Prettier 2.0.5) no longer happens. On 3.9.10 and on
main,a<U+00A0>是is printed unchanged with everyproseWrapvalue.This adds tests so it stays that way:
Each case runs with
proseWrapset toalways,preserveandnever. The tests are in JS with\u{a0}, likesplitCjkText/non-bmp, so the character is visible in review.I checked that the test fails when the expected output has the extra space from the issue.
FULL_TEST=1 jestpasses for the new tests, and ESLint, Prettier and cSpell pass on the new file.Checklist
docs/directory).changelog_unreleased/*/XXXX.mdfile followingchangelog_unreleased/TEMPLATE.md.This only adds tests, so there is no changelog entry. I used Claude Code for this PR and reviewed the change and the test results.