Page MenuHomePhabricator

References parsing JS doesn't recognize cluster of ref links if they have space between links.
Closed, ResolvedPublic

Description

It works fine if the refs looks like this "[1][2][3]"

But it doesn't if they look like this "[1] [2] [3]"


Version: Alpha
Severity: normal

Details

Reference
bz68831

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:34 AM
bzimport set Reference to bz68831.
bzimport added a subscriber: Unknown Object (MLST).

One way to fix this is by replacing nextSibling/previousSibling with nextElementSibling/previousElementSibling.
The drawback is that it also finds some elements a bit farther away.

Got a sample page to test with? Probably easyish to fix per Bernd's note

I created one on test wiki, but not sure if they really happen in a real world wiki.
https://test.wikipedia.org/wiki/Reference_Test, refs [4]-[7]

Done on the iOS refs branch in: https://gerrit.wikimedia.org/r/#/c/148247/ -- see the goLeft/goRight functions