Shortcut Link Questions

Example 561 is perhaps a simpler example of the same issue:


[foo][bar]

[foo]: /url1

[bar]: /url2

Output


<p><a href="/url2">foo</a></p>

This is because the spec says “Full and compact references take precedence over shortcut references". But the author, who took the time to disambiguate the references by including them both in the link reference, may find it confusing, expecting, instead:


<p><a href="/url1">foo</a><a href="/url2">bar</a></p>

I get that the parser needs to determine precedence, and I certainly wouldn’t expect anything different if [foo] wasn’t referenced in the link reference, e.g.,


[foo][bar]

[baz]: /url1

[bar]: /url2

But when I as the author have explicitly defined the labels in the references, as in example 561, I would think that would take precedence over the parer’s idea of precedence. IOW, the references should take precedence over the order of brackets in the text, because they’re explicit, and demonstrate the author’s intent.

1 Like