-
-
Notifications
You must be signed in to change notification settings - Fork 322
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
Clarify if escaped space is allowed in link destination #493
Comments
Spaces cannot be backslash-escaped, only punctuation. The space in your example is not part of the "link destination", because this would not be allowed ("... does not include ASCII space ..."). The space is still allowed, because it's part of the inline link:
IMHO, this is a bug in commonmark.js, other CommonMark parsers get it right: http://johnmacfarlane.net/babelmark2/?text=%5Bfoo%5D(%5C+). |
Good point about being allowed in an inline link, so this is a slightly different test:
|
Interesting, now there are two implementations with a bug: commonmark.js and markdown-it: http://johnmacfarlane.net/babelmark2/?text=%5Bfoo%5D(a%5C+b). I remember some discussions about allowing spaces in link destinations (which would un-break many links on Github, for example), but this here is another issue. |
I think the spec as stated should not allow
[foo](a\ b)
as a link, so this seems to me an implementation bug
(in both cmark and commonmark.js).
|
There were two failing tests, related to: * Backslash in link destinations (see commonmark/commonmark-spec#493) * Tabs in ATX/Setext headers Change the implementation to match the reference implementation.
Makes sense, thanks John. Updated commonmark-java. |
The spec for link destinations (without angle brackets) says:
It's not clear whether an escaped space is valid or not, as in:
Currently, the dingus produces:
Thoughts?
The text was updated successfully, but these errors were encountered: