mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-12 01:01:29 +00:00
Merge "Add test cases for duplicate <references> with same group"
This commit is contained in:
commit
79e7b2b474
|
@ -1276,6 +1276,19 @@ A <ref>foo</ref>
|
|||
B <ref>bar</ref>
|
||||
|
||||
<references />
|
||||
!! html
|
||||
<p>A <sup id="cite_ref-1" class="reference"><a href="#cite_note-1">[1]</a></sup>
|
||||
</p>
|
||||
<div class="mw-references-wrap"><ol class="references">
|
||||
<li id="cite_note-1"><span class="mw-cite-backlink"><a href="#cite_ref-1">↑</a></span> <span class="reference-text">foo</span>
|
||||
</li>
|
||||
</ol></div>
|
||||
<p>B <sup id="cite_ref-2" class="reference"><a href="#cite_note-2">[1]</a></sup>
|
||||
</p>
|
||||
<div class="mw-references-wrap"><ol class="references">
|
||||
<li id="cite_note-2"><span class="mw-cite-backlink"><a href="#cite_ref-2">↑</a></span> <span class="reference-text">bar</span>
|
||||
</li>
|
||||
</ol></div>
|
||||
!! html/parsoid
|
||||
<p>A <sup about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{},"body":{"id":"mw-reference-text-cite_note-1"}}'><a href="./Parser_test#cite_note-1"><span class="mw-reflink-text">[1]</span></a></sup></p>
|
||||
|
||||
|
@ -1289,6 +1302,31 @@ B <ref>bar</ref>
|
|||
</ol>
|
||||
!! end
|
||||
|
||||
!! test
|
||||
Counters should be cleared after processing named <references group="…">
|
||||
!! wikitext
|
||||
A <ref group="g">foo</ref>
|
||||
|
||||
<references group="g" />
|
||||
|
||||
B <ref group="g">bar</ref>
|
||||
|
||||
<references group="g" />
|
||||
!! html
|
||||
<p>A <sup id="cite_ref-1" class="reference"><a href="#cite_note-1">[g 1]</a></sup>
|
||||
</p>
|
||||
<div class="mw-references-wrap"><ol class="references">
|
||||
<li id="cite_note-1"><span class="mw-cite-backlink"><a href="#cite_ref-1">↑</a></span> <span class="reference-text">foo</span>
|
||||
</li>
|
||||
</ol></div>
|
||||
<p>B <sup id="cite_ref-2" class="reference"><a href="#cite_note-2">[g 1]</a></sup>
|
||||
</p>
|
||||
<div class="mw-references-wrap"><ol class="references">
|
||||
<li id="cite_note-2"><span class="mw-cite-backlink"><a href="#cite_ref-2">↑</a></span> <span class="reference-text">bar</span>
|
||||
</li>
|
||||
</ol></div>
|
||||
!! end
|
||||
|
||||
!! test
|
||||
References: 4. only referenced group should be cleared after processing references
|
||||
!! wikitext
|
||||
|
|
Loading…
Reference in a new issue