https://bugzilla.wikimedia.org/show_bug.cgi?id=49555

       Web browser: ---
            Bug ID: 49555
           Summary: Support nested <ref> tags
           Product: Parsoid
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: JS/General
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
            Blocks: 49536
    Classification: Unclassified
   Mobile Platform: ---

It is (sadly) possible and known for users to create nested <ref> tags, using
{{#tag:ref|foo<ref>bar</ref>}}.

Real-world example:

https://en.wikipedia.org/wiki/Fomitiporia_ellipsoidea

Wikitext fragment:

{{#tag:ref|These sizes are based on the original [[species
description|description]] offered by Cui and Dai in 2008.<ref>Cui and Dai
2008</ref> Dai described the [[type specimen]] as "not huge", and a
significantly larger specimen has since been found. Dai said that, before the
discovery, he and Cui "did not know the fungus [could] grow so huge".<ref
name="BBC">Walker 2011</ref>|group=note}}

Output HTML from PHP parser in <references group="note" /> block:

<li id="cite_note-12"><span class="mw-cite-backlink"><b><a
href="#cite_ref-12">^</a></b></span> <span class="reference-text">These sizes
are based on the original <a href="/wiki/Species_description" title="Species
description">description</a> offered by Cui and Dai in 2008.<sup
id="cite_ref-10" class="reference"><a
href="#cite_note-10"><span>[</span>10<span>]</span></a></sup> Dai described the
<a href="/wiki/Type_specimen" title="Type specimen" class="mw-redirect">type
specimen</a> as "not huge", and a significantly larger specimen has since been
found. Dai said that, before the discovery, he and Cui "did not know the fungus
[could] grow so huge".<sup id="cite_ref-BBC_11-0" class="reference"><a
href="#cite_note-BBC-11"><span>[</span>11<span>]</span></a></sup></span></li>

Output HTML from Parsoid for above:

<li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a
href="#cite_ref-1-0">↑</a></span> <span>These sizes are based on the original
<a rel="mw:WikiLink" href="./Species_description"
data-parsoid="{&quot;a&quot;:{&quot;href&quot;:&quot;./Species_description&quot;},&quot;sa&quot;:{&quot;href&quot;:&quot;species
description&quot;},&quot;stx&quot;:&quot;piped&quot;,&quot;dsr&quot;:[56,91,22,2]}">description</a>
offered by Cui and Dai in 2008.<span about="#mwt161" class="reference"
data-mw="{&quot;name&quot;:&quot;ref&quot;,&quot;body&quot;:{&quot;html&quot;:&quot;Cui
and Dai 2008&quot;},&quot;attrs&quot;:{}}" id="cite_ref-1-0"
rel="dc:references" typeof="mw:Extension/ref"
data-parsoid="{&quot;src&quot;:&quot;&lt;ref&gt;Cui and Dai
2008&quot;,&quot;dsr&quot;:[123,144,5,0]}"><a
href="#cite_note-1">[1]</a></span></span></li>

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to