Page MenuHomePhabricator

Flow: Reference numbers in Parsoid output aren't superscripted
Closed, ResolvedPublic



Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:51 AM
bzimport set Reference to bz60017.
bzimport added a subscriber: Unknown Object (MLST).
Quiddity created this task.Jan 13 2014, 9:58 PM

bingle-admin wrote:

The WMF core features team tracks this bug on Mingle card, but people from the community are welcome to contribute here and in Gerrit.

Also, in the mediawikiwiki example ( ) there is also a problem with the {{reflist}} being in a <pre> formatted div.

/Possibly/ this has the same root problem? I notice in the html-source code that there are a lot of &quot;s (or &amp;quot;s if the first gets converted in this comment).

Or possibly it's because the [[mw:Template:Reflist]] is much older than the [[Template:Reflist]] at Enwiki and ee-flow?

I'm not sure if I should open a separate bug for that...?

The pre-formatted div you mention in #comment 2 seems fixed on mediawiki.

The lack of superscript may be because Parsoid doesn't run the <ref> tag through Extension:Cite/Cite.php – it doesn't use the PHP parser's hooks. But it clearly does something with the <ref> tag, turning it into a <span class="reference"> containing a hyperlink with a counted element. If it's by design that Parsoid doesn't output a <sup> tag, then a workaround could be to include Parsoid-specific CSS matching the browser's built-in styling of <sup> i.e.

span.reference { font-size: smaller; line-height: normal; vertical-align: super;}

Some other glitches with reference tags:

  • The hyperlinks between the citation [1] and the reference are #citeANCHORNAME fragments, but because the Flow page includes a <base href="/wiki/Talk:Sandbox"> (in order to make relative links work?), following the links when you're viewing this topic in isolation makes you leave the current page, and if it's scrolled off the Flow board the link won't work. This happens on , I'll file a separate bug.
  • Each post restarts its citation counters. It's technically illegal HTML to have two id="cite_note-1" in one document and it's undefined what hyperlinks using that as a fragment will do. So citations can never work correctly when the Flow board or single topic view shows more than one post using them, unless each Flow post provides an anchorPrefixParameter to Parsoid like '#flow-postId-flow-post-rn84j0djfcyxetu8-' , and Parsoid prepends that when generating id, name, and href attributes. Another separate bug.

(In reply to spage from comment #3)

  • The hyperlinks between the citation [1] and the reference are

#citeANCHORNAME fragments, but because the Flow page includes a
<base href="/wiki/Talk:Sandbox"> ... [they] won't work.

I filed bug 62691, maybe Flow doesn't need to output <base href> any more.

Change 124787 had a related patch set uploaded by Spage:
Add Parsoid's CSS modules

Change 124787 merged by jenkins-bot:
Add Parsoid's CSS modules

The superscripting is fixed in 1.24wmf3, the other glitches in comment #3, should probably be filed as enhancements.