Skip to content
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

␤ actually becomes a newline when it shouldn't #1531

Closed
s5bug opened this issue Aug 5, 2019 · 3 comments · Fixed by #1532
Closed

␤ actually becomes a newline when it shouldn't #1531

s5bug opened this issue Aug 5, 2019 · 3 comments · Fixed by #1532
Labels
L1 - broken Valid usage causes incorrect output OR a crash AND there is no known workaround for the issue

Comments

@s5bug
Copy link

s5bug commented Aug 5, 2019

Describe the bug
U+2424 becomes a newline

To Reproduce
Try it out in the demo

Expected behavior
The ␤ character actually shows up in text.

According to Wikipedia:

The Unicode characters U+2424 (SYMBOL FOR NEWLINE, ␤), U+23CE (RETURN SYMBOL, ⏎), U+240D (SYMBOL FOR CARRIAGE RETURN, ␍) and U+240A (SYMBOL FOR LINE FEED, ␊) are intended for presenting a user-visible character to the reader of the document, and are thus not recognized themselves as a newline.

@UziTech
Copy link
Member

UziTech commented Aug 5, 2019

confirmed:
marked demo
commonmark demo

@UziTech UziTech added the L1 - broken Valid usage causes incorrect output OR a crash AND there is no known workaround for the issue label Aug 5, 2019
@UziTech
Copy link
Member

UziTech commented Aug 5, 2019

It looks like this was introduced to fix "contenteditable" content. #52

Seems to be the same issue with U+00A0 in #897 (comment)

I'm all for removing these substitutions and telling people to substitute these characters in the string before sending it to marked if they need to be substituted.

@styfle @joshbruce should we finally remove these substitutions in v0.8.0?

@styfle
Copy link
Member

styfle commented Aug 5, 2019

should we finally remove these substitutions in v0.8.0?

Yes, let's do it 👍

Using contenteditable seems less common than using U+00A0 and ␤ character.

Changing this would also fix #363

@UziTech UziTech mentioned this issue Aug 5, 2019
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L1 - broken Valid usage causes incorrect output OR a crash AND there is no known workaround for the issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants