diff options
author | John MacFarlane <jgm@berkeley.edu> | 2016-01-05 22:33:49 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2016-01-05 22:33:49 -0800 |
commit | 2136f824b739c9525d25a6850f0bede1cd7d964b (patch) | |
tree | ddcba1a4711f5efc1aef9a296d355812de9324ff | |
parent | 83f03993ddffac6de6447bb6d95580eaa8de37cc (diff) |
Disallow spaces in link destinations, even in pointy braces.
See discussion at
http://talk.commonmark.org/t/minor-comments-and-unclarities-after-reading-the-spec/779
http://talk.commonmark.org/t/issues-to-resolve-before-1-0-release/1287/12
-rw-r--r-- | spec.txt | 14 |
1 files changed, 6 insertions, 8 deletions
@@ -2363,7 +2363,7 @@ them. . [Foo bar]: -<my url> +<my%20url> 'title' [Foo bar] @@ -6465,8 +6465,8 @@ following rules apply: A [link destination](@link-destination) consists of either - a sequence of zero or more characters between an opening `<` and a - closing `>` that contains no line breaks or unescaped `<` or `>` - characters, or + closing `>` that contains no spaces, line breaks, or unescaped + `<` or `>` characters, or - a nonempty sequence of characters that does not include ASCII space or control characters, and includes parentheses @@ -6532,8 +6532,8 @@ Both the title and the destination may be omitted: <p><a href="">link</a></p> . -If the destination contains spaces, it must be enclosed in pointy -braces: +The destination cannot contain spaces or line breaks, +even if enclosed in pointy brackets: . [link](/my uri) @@ -6544,11 +6544,9 @@ braces: . [link](</my uri>) . -<p><a href="/my%20uri">link</a></p> +<p>[link](</my uri>)</p> . -The destination cannot contain line breaks, even with pointy braces: - . [link](foo bar) |