commonmark-spec
commonmark-spec copied to clipboard
Allow shortcut reference link before unmatched label
This is of course an edge case. I still think the spec should be changed to be more consistent.
This concerns example 540 from the spec 0.27:
[foo][bar][baz]
[baz]: /url1
[foo]: /url2
Everywhere else, reference links are only recognized if they are matching. Unmatched reference links don't have any significance to the parser.
Therefore, in this case, the unmatched reference link [foo][bar] should also not have any significance, and the parser should continue to happily match [foo] as shortcut reference link.