mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-28 00:40:12 +00:00
Merge "Improve test coverage for incomplete follow=… rendering"
This commit is contained in:
commit
310075ec69
|
@ -571,22 +571,22 @@ It's not possible to follow="…" a <ref> defined in the <references> section
|
|||
!! test
|
||||
A follow="…" before its parent is not merged
|
||||
!! wikitext
|
||||
<ref follow="theName">theFollows</ref>
|
||||
<ref name="theName">theValue</ref>
|
||||
<ref follow="theName">''theFollows''</ref>
|
||||
<ref name="theName">''theValue''</ref>
|
||||
<references />
|
||||
!! html/php
|
||||
<p><sup id="cite_ref-theName_2-0" class="reference"><a href="#cite_note-theName-2">[1]</a></sup>
|
||||
</p>
|
||||
<div class="mw-references-wrap"><ol class="references">
|
||||
<p id="cite_note-theName"><span class="reference-text">theFollows</span>
|
||||
<p id="cite_note-theName"><span class="reference-text"><i>theFollows</i></span>
|
||||
</p>
|
||||
<li id="cite_note-theName-2"><span class="mw-cite-backlink"><a href="#cite_ref-theName_2-0">↑</a></span> <span class="reference-text">theValue</span>
|
||||
<li id="cite_note-theName-2"><span class="mw-cite-backlink"><a href="#cite_ref-theName_2-0">↑</a></span> <span class="reference-text"><i>theValue</i></span>
|
||||
</li>
|
||||
</ol></div>
|
||||
!! html/parsoid
|
||||
<p><sup about="#mwt2" class="mw-ref reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref mw:Error" data-mw='{"name":"ref","attrs":{"follow":"theName"},"body":{"id":"mw-reference-text-cite_note-1"},"errors":[{"key":"cite_error_references_missing_key","params":["theName"]}]}'><a href="./Parser_test#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></sup>
|
||||
<sup about="#mwt4" class="mw-ref reference" id="cite_ref-theName_2-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"theName"},"body":{"id":"mw-reference-text-cite_note-theName-2"}}'><a href="./Parser_test#cite_note-theName-2" style="counter-reset: mw-Ref 2;"><span class="mw-reflink-text">[2]</span></a></sup></p>
|
||||
<div class="mw-references-wrap" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'><ol class="mw-references references"><li about="#cite_note-1" id="cite_note-1"><a href="./Parser_test#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text"><span typeof="mw:Cite/Follow" about="#mwt2"> theFollows</span></span></li><li about="#cite_note-theName-2" id="cite_note-theName-2"><a href="./Parser_test#cite_ref-theName_2-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-theName-2" class="mw-reference-text">theValue</span></li></ol></div>
|
||||
<div class="mw-references-wrap" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'><ol class="mw-references references"><li about="#cite_note-1" id="cite_note-1"><a href="./Parser_test#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text"><span typeof="mw:Cite/Follow" about="#mwt2"> <i>theFollows</i></span></span></li><li about="#cite_note-theName-2" id="cite_note-theName-2"><a href="./Parser_test#cite_ref-theName_2-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-theName-2" class="mw-reference-text"><i>theValue</i></span></li></ol></div>
|
||||
!! end
|
||||
|
||||
## This is a nasty edge case which was dropping the ref entirely from the
|
||||
|
|
Loading…
Reference in a new issue