Page MenuHomePhabricator

Linter for "references in links"
Open, MediumPublicFeature

Description

There exists a "links-in-links" linter category (see for instance https://en.wikipedia.org/wiki/Special:LintErrors/wikilink-in-extlink on English wiki).

This linter does not currently take into account references in links (such as [[link|text<ref>ref</ref>]]), whereas it would still generate nested <a> tags (which are illegal from an HTML specification point of view). This usage, along with other edge cases, triggered T301293. On its own, it also creates rendering discrepancies for the reference tag (the footnote marker is not in a <sup> tag anymore), and is probably related to issues such as T289491.

It may not be entirely obvious that references are handled as links, so a new linter category may be appropriate (opinions welcome), or we can consider that as part of a "wikilink in extlink" scenario, although this may technically need to be renamed for that purpose.