diff options
author | Yuki Izumi <kivikakk@github.com> | 2016-12-01 20:52:42 +1100 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2016-12-01 10:52:42 +0100 |
commit | a9da6782761e4d3ac7dfd3193fa43b73824afef4 (patch) | |
tree | c0dcc68162fc0ea0bc2998be0d052b8cdcc802da /test/spec.txt | |
parent | ea68f8830dcea3c21b91b02bf3bede8789961acd (diff) |
Allow balanced nested parens in link destinations (#166)
Diffstat (limited to 'test/spec.txt')
-rw-r--r-- | test/spec.txt | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/test/spec.txt b/test/spec.txt index c66f93b..c49e85b 100644 --- a/test/spec.txt +++ b/test/spec.txt @@ -7148,8 +7148,7 @@ A [link destination](@) consists of either - a nonempty sequence of characters that does not include ASCII space or control characters, and includes parentheses only if (a) they are backslash-escaped or (b) they are part of - a balanced pair of unescaped parentheses that is not itself - inside a balanced pair of unescaped parentheses. + a balanced pair of unescaped parentheses. A [link title](@) consists of either @@ -7255,35 +7254,29 @@ Parentheses inside the link destination may be escaped: <p><a href="(foo)">link</a></p> ```````````````````````````````` -One level of balanced parentheses is allowed without escaping: - -```````````````````````````````` example -[link]((foo)and(bar)) -. -<p><a href="(foo)and(bar)">link</a></p> -```````````````````````````````` - -However, if you have parentheses within parentheses, you need to escape -or use the `<...>` form: +Any number parentheses are allowed without escaping, as long as they are +balanced: ```````````````````````````````` example [link](foo(and(bar))) . -<p>[link](foo(and(bar)))</p> +<p><a href="foo(and(bar))">link</a></p> ```````````````````````````````` +However, if you have unbalanced parentheses, you need to escape or use the +`<...>` form: ```````````````````````````````` example -[link](foo(and\(bar\))) +[link](foo\(and\(bar\)) . -<p><a href="foo(and(bar))">link</a></p> +<p><a href="foo(and(bar)">link</a></p> ```````````````````````````````` ```````````````````````````````` example -[link](<foo(and(bar))>) +[link](<foo(and(bar)>) . -<p><a href="foo(and(bar))">link</a></p> +<p><a href="foo(and(bar)">link</a></p> ```````````````````````````````` |