From 26f58002be0278ae05bee0e5f8543efbbbd9573e Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Thu, 1 Dec 2016 10:54:10 +0100 Subject: Allow unlimited balanced pairs of parentheses in link URLs. See #166. The rationale is that there are many URLs containing unescaped nested parentheses. --- spec.txt | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) (limited to 'spec.txt') diff --git a/spec.txt b/spec.txt index c66f93b..c49e85b 100644 --- a/spec.txt +++ b/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:

link

```````````````````````````````` -One level of balanced parentheses is allowed without escaping: - -```````````````````````````````` example -[link]((foo)and(bar)) -. -

link

-```````````````````````````````` - -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))) . -

[link](foo(and(bar)))

+

link

```````````````````````````````` +However, if you have unbalanced parentheses, you need to escape or use the +`<...>` form: ```````````````````````````````` example -[link](foo(and\(bar\))) +[link](foo\(and\(bar\)) . -

link

+

link

```````````````````````````````` ```````````````````````````````` example -[link]() +[link]() . -

link

+

link

```````````````````````````````` -- cgit v1.2.3