-
-
Notifications
You must be signed in to change notification settings - Fork 357
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
Remark replaces double trailing spaces (simple line break) with a backslash #249
Comments
That’s because to invisible spaces at the end of a line is a pretty bad design decision, and common mark came with a fix! If you end a line with a slash, it does the same. So, if you specify that you want to use common mark, it’ll use the smarter, commonmark-compliant way. Why would you want commonmark if you don’t want commonmark output? :) |
Okay, let's say that I decide to use the trailing backslash. The other issue is that if I reparse the file, the code
becomes
All I did was to run my script again, with the same parameters. |
Weird, I don’t this either. Maybe this is related to #250? |
In this example, commonmark-mode is not on, so, if you remove the solidus and use two spaces, the output won’t be changed. In this non-commonmark-mode, if you use one slash, it’ll escape it (which doesn’t affect markdown). Note that if you run If you’d add the following to your "settings": {
"commonmark": true
} ...and use one slash, it won’t change the amount of slashes. Oh and finally, a) if you have a |
Hello,
I use remark with
remark-cli
as a way to parse and correct my markdown files through a npm script.The script in question simply runs
remark {dir} -oq --rc-path {somePath}
.The
.remarkrc
file contains this:My issue is when I parse a .md file with double space as line-break, it adds a backslash
\
instead.Original file
Is parsed to
For now, the only way to reproduce that outside the cli, is to use
atom-beautify
and in the Markdown beautification, tick the "Commonmark" option.Any idea why this happens, and how to avoid it?
Thank you.
The text was updated successfully, but these errors were encountered: