Parsoid: References should be wrapped in a <sup>, not a <span>
Closed, DeclinedPublic


Canonical HTML (from PHP parser):

<sup id="cite_ref-Forty_47-0" class="reference">

<a href="#cite_note-Forty-47"><span>[</span>47<span>]</span></a>


Output from Parsoid:

<span id="cite_ref-Forty-46-0" class="reference" about="#mwt408" typeof="mw:Object/Ext/Cite" data-parsoid="…">

<a href="#cite_note-Forty-46">[47]</a>


I have no idea if the inner spans have any value, but the outer span should be a sup element instead.

(Also, the names of the cites are indexed from 0 in names but 1 in label - 46 vs. 47, whereas in PHP parser they're indexed from 1 in both; not sure if this is a problem.)

Version: unspecified
Severity: trivial

bzimport added projects: Parsoid, Easy.Via ConduitNov 22 2014, 12:44 AM
bzimport set Reference to bz43094.
Jdforrester-WMF created this task.Via LegacyDec 13 2012, 9:20 PM
GWicke added a comment.Via ConduitJun 12 2013, 10:35 PM

About sup and sub in the HTML5 spec:

"These elements must be used only to mark up typographical conventions with specific meanings, not for typographical presentation for presentation's sake. For example, it would be inappropriate for the sub and sup elements to be used in the name of the LaTeX document preparation system. In general, authors should use these elements only if the absence of those elements would change the meaning of the content."

This does not seem to be the case here, and styling is more flexible with spans. Since we will require some CSS adjustments anyway we might as well clean this one up too.

Closing as WONTFIX for that reason.

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.