-
-
Notifications
You must be signed in to change notification settings - Fork 361
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
Remove support for seeing non-ASCII whitespace as such #321
Comments
Hey @maximbaz! I tried it on the commonmark dingus (permalinking doesn’t work for me there) and it didn’t have your result. Why do you believe markdown should act like this? P.S. GitHub does show them: preserve leading and trailing no-break whitespaces in inline code: |
Hey, this all started because I have a variable with trailing whitespace as a default value, and this is documented in a markdown file (example below). I noticed that Github removes the trailing whitespace, and then I was suggested to use a non-breaking whitespace because Github keeps it. However, Now I see that apparently multiple markdown specifications exist (of course 🤦♂️ ), and not all of them preserve non-breaking whitespaces... What do you usually do in such cases? Follow commonmark's specification and not github's? |
Actually, can it be a bug in commonmark dingus? http://spec.commonmark.org/0.28/#code-spans
http://spec.commonmark.org/0.28/#space
|
It could be! I dunno?! Anyway, unrelated to this bug, but related to your original question: what I personally do in these cases of invisible characters is use the middot characters: |
This is an interesting approach, thanks for sharing! |
Could you check with commonmark to see if it’s a bug in their code / dingus?
|
It was easy, here's owner of commonmark repo explaining that non-breaking space should not be stripped, and this ticket in commonmark.js is describing what looks like a pretty much the same issue. |
Subject of the issue
Markdown strips regular whitespaces:
hello
However it preserves non-breaking whitespaces:
hello
Parser should also preserve non-breaking whitespaces, while stripping regular ones.
Steps to reproduce
astexplorer
Expected behaviour
Actual behaviour
The text was updated successfully, but these errors were encountered: