commonmark / commonmark-spec

CommonMark spec, with reference implementations in C and JavaScript
http://commonmark.org
Other
4.89k stars 317 forks source link

Inconsistent escape handling in link/autolink destinations #445

Open mity opened 7 years ago

mity commented 7 years ago

(Original discussion here: https://talk.commonmark.org/t/backslash-escapes-inside-link-destinations/2312)

Consider various spans where link destination can appear:

<http:\*>

[link](http:\*)
[link](<http:\*>)

[refdef]: http:\*
[refdef]: <http:\*>

Currently (0.27), backslash-escapes do not work inside autolinks, but they do work in (destination portion of) links and reference link definitions.

I believe this should be unified for the sake of uniformity, at least in the case of link destinations enclosed between< >. IDK whether it would be better to or not to support the escapes there, but handling them differently is likely the worst possible approach.

digitalmoksha commented 3 years ago

I just ran across this inconsistency as well