-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Markdown: preserve non-ASCII whitespaces at the end of the line and beginning of the next line #16619
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
ec07027
to
5c60b43
Compare
https://spec.commonmark.org/dingus/?text=%E3%80%80%E5%85%A8%E8%A7%92%E7%A9%BA%E7%99%BD%E3%80%80%0A Hm, the official dingus removes such spaces. |
It was proven to be a commonmark.js's bug. |
@fisker do you approve the last change of the comment (in the last commit)? |
cspell emits false-positive on `\u{feff}`
Line 328 in 69f4192
|
I agree with you, and I chose the way to silence cspell thanks to you. |
Description
The safest part of #15081
Prettier removes non-ASCII whitespaces at the end of the line and beginning of the next line in Markdown, which violates the CommonMark spec.
The space (U+3000) in the following should be kept:
# 例 全角スペース全形空白
https://spec.commonmark.org/0.31.2/#soft-line-breaks
https://spec.commonmark.org/0.31.2/#unicode-whitespace-character
The CommonMark spec doesn't mention non-ASCII spaces here, so they should be reserved.
Checklist
docs/
directory).changelog_unreleased/*/XXXX.md
file followingchangelog_unreleased/TEMPLATE.md
.✨Try the playground for this PR✨