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

Line separator should not be "/n" (sic) #76

Closed
bazzargh opened this issue Jul 19, 2017 · 1 comment
Closed

Line separator should not be "/n" (sic) #76

bazzargh opened this issue Jul 19, 2017 · 1 comment

Comments

@bazzargh
Copy link
Contributor

bazzargh commented Jul 19, 2017

sep = sep || detectNewLine(text) || '/n';

^ found this reading the code. It's falling back on using "/n" not "\n" as the line break if detection fails, which is nonsensical. detect-newline already contains code to cover this - detectNewline.graceful(x) will return "\n" for this case.
https://github.com/sindresorhus/detect-newline/blob/master/index.js#L23

bazzargh added a commit to bazzargh/markup-it that referenced this issue Jul 19, 2017
This is an obvious typo, but the test in this PR shows it can trigger
a bug.
SamyPesse pushed a commit that referenced this issue Jul 19, 2017
This is an obvious typo, but the test in this PR shows it can trigger
a bug.
@SamyPesse
Copy link
Member

Closed by #77

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants