Page MenuHomePhabricator

Highlighting does not work if span with mw-cite-backlink class is removed
Closed, ResolvedPublic5 Story Points


The current jump mark highlighting relies on the default reference link format containing the mw-cite-backlink CSS class:

<li id=\"$1\"$4><span class=\"mw-cite-backlink\">↑ $2</span> $3</li>

Since this is part of a i18n message it can be altered and overwritten. This happened for example on en.wikipedia.beta. [1]


Event Timeline

WMDE-Fisch triaged this task as Normal priority.Nov 27 2018, 3:20 PM
WMDE-Fisch created this task.
Anomie added a subscriber: Anomie.Nov 27 2018, 7:08 PM

It looks like your code also breaks on some changes to MediaWiki:Cite_references_link_many_format. Specifically, if all the formatting is inside the link instead of wrapping the link, as was the case in for example, it doesn't find the links.

Change 476246 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/Cite@master] Make backlink highlighting robust when "mw-cite-backlink" is missing

Change 476246 merged by jenkins-bot:
[mediawiki/extensions/Cite@master] Make backlink highlighting robust when "mw-cite-backlink" is missing


On en.beta [1] I currently have the link format from ja.WP [2] with missing mw-cite-backlink class laoded [3]. - With the latest improvements the added arrow up backlink still works with the multiple reference [1].


We could consider backporting this so it's deployed before end of next week.

Anomie removed a subscriber: Anomie.Dec 3 2018, 3:29 PM
thiemowmde set the point value for this task to 5.Dec 4 2018, 9:49 AM
Izno moved this task from Unsorted backlog to External on the Cite board.Dec 8 2018, 12:31 AM
Lea_WMDE closed this task as Resolved.Dec 14 2018, 11:59 AM
Lea_WMDE moved this task from Demo to Done on the WMDE-QWERTY-Sprint-2018-11-20 board.