From e7e2b3071c32589dea1f4adca69edbd2a79c7b3c Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 1 Aug 2017 16:12:01 -0700 Subject: Further clarifications of link labels. Say explicitly that normalization involves stripping off leading and trailing bracket characters, before stripping leading and trailing whitespace. See #479. --- spec.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'spec.txt') diff --git a/spec.txt b/spec.txt index 9d36f67..f0ba350 100644 --- a/spec.txt +++ b/spec.txt @@ -7587,13 +7587,15 @@ that [matches] a [link reference definition] elsewhere in the document. A [link label](@) begins with a left bracket (`[`) and ends with the first right bracket (`]`) that is not backslash-escaped. Between these brackets there must be at least one [non-whitespace character]. -Unescaped square bracket characters are not allowed in -[link labels]. A link label can have at most 999 -characters inside the square brackets. +Unescaped square bracket characters are not allowed inside the +opening and closing square brackets of [link labels]. A link +label can have at most 999 characters inside the square +brackets. One label [matches](@) another just in case their normalized forms are equal. To normalize a -label, perform the *Unicode case fold*, strip leading and trailing +label, strip off the opening and closing brackets, +perform the *Unicode case fold*, strip leading and trailing [whitespace] and collapse consecutive internal [whitespace] to a single space. If there are multiple matching reference link definitions, the one that comes first in the -- cgit v1.2.3