mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-27 16:30:12 +00:00
Resolve a TODO by covering it with a test case
It turns out this is indeed necessary. The test demonstrates why. Change-Id: Id9c6a48f72ef8d3f0cc9a714d826418e69913b0a
This commit is contained in:
parent
e343af3408
commit
9565d6e887
|
@ -343,8 +343,7 @@ class ReferenceStack {
|
|||
case 'new':
|
||||
// Rollback the addition of new elements to the stack
|
||||
unset( $this->refs[$group][$lookup] );
|
||||
if ( $this->refs[$group] === [] ) {
|
||||
// TODO: Unsetting is unecessary.
|
||||
if ( !$this->refs[$group] ) {
|
||||
$this->popGroup( $group );
|
||||
}
|
||||
// TODO: else, don't we need to decrement groupRefSequence?
|
||||
|
|
|
@ -2037,6 +2037,27 @@ T242437 - Blank ref name in #tag regression
|
|||
</p>
|
||||
!! end
|
||||
|
||||
!! test
|
||||
Numbers in the default group need to start with 1, independent from other groups
|
||||
!! wikitext
|
||||
<ref name="a" group="g" />
|
||||
{{#tag:references|
|
||||
<ref name="a">a</ref>
|
||||
|group=g}}
|
||||
<ref name="c">c</ref>
|
||||
!! html
|
||||
<p><sup id="cite_ref-a_1-0" class="reference"><a href="#cite_note-a-1">[g 1]</a></sup>
|
||||
</p>
|
||||
<div class="mw-references-wrap"><ol class="references">
|
||||
<li id="cite_note-a-1"><span class="mw-cite-backlink"><a href="#cite_ref-a_1-0">↑</a></span> <span class="reference-text">a</span>
|
||||
</li>
|
||||
</ol></div>
|
||||
<sup id="cite_ref-c_3-0" class="reference"><a href="#cite_note-c-3">[1]</a></sup><div class="mw-references-wrap"><ol class="references">
|
||||
<li id="cite_note-c-3"><span class="mw-cite-backlink"><a href="#cite_ref-c_3-0">↑</a></span> <span class="reference-text">c</span>
|
||||
</li>
|
||||
</ol></div>
|
||||
!! end
|
||||
|
||||
!! test
|
||||
Serialize reference tags by themselves on a line
|
||||
!! options
|
||||
|
|
Loading…
Reference in a new issue