commonmark-spec icon indicating copy to clipboard operation
commonmark-spec copied to clipboard

Clarify link label matching

Open dbuenzli opened this issue 4 years ago • 1 comments

In the 0.30 spec we have:

One label matches another just in case their normalized forms are equal. To normalize a label, strip off the opening and closing brackets, perform the Unicode case fold, [...]

"Perform the Unicode case fold" is a bit unclear – in the sense I had to consult cmark to see what it was doing. If I understood correctly this is definition R4 of the Unicode standard p. 154. so maybe that could be referenced


P.S. A better definition would likely have been R5 as it would handle correctly identifiers in different normal forms (like é composed in one id and é decomposed in another one) but you'd need to import the Unicode normalization and associated machinery into the definition of CommonMark.

dbuenzli avatar Nov 11 '21 11:11 dbuenzli