mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-23 22:45:20 +00:00
Merge "Add parser tests for reused extended <ref> before defined"
This commit is contained in:
commit
9cc9e9cdc1
|
@ -81,6 +81,53 @@ wgCiteBookReferencing=true
|
|||
</ol></div>
|
||||
!! end
|
||||
|
||||
# TODO: The number for the first <ref> must be "1.1", not just "1"
|
||||
!! test
|
||||
T240424 - Extended reference reused before defined in the text
|
||||
!! config
|
||||
wgCiteBookReferencing=true
|
||||
!! wikitext
|
||||
<ref name="b" />
|
||||
<ref name="b" extends="a">page 2</ref>
|
||||
<ref name="a">book</ref>
|
||||
!! html
|
||||
<p><sup id="cite_ref-b_1-0" class="reference"><a href="#cite_note-b-1">[1]</a></sup>
|
||||
<sup id="cite_ref-b_1-1" class="reference"><a href="#cite_note-b-1">[1.1]</a></sup>
|
||||
</p>
|
||||
<sup id="cite_ref-a_2-0" class="reference"><a href="#cite_note-a-2">[1]</a></sup><div class="mw-references-wrap"><ol class="references">
|
||||
<li id="cite_note-a-2"><span class="mw-cite-backlink"><a href="#cite_ref-a_2-0">↑</a></span> <span class="reference-text">book</span>
|
||||
<ol class="mw-extended-references"><li id="cite_note-b-1"><span class="mw-cite-backlink">↑ <sup><a href="#cite_ref-b_1-0">1.1.0</a></sup> <sup><a href="#cite_ref-b_1-1">1.1.1</a></sup></span> <span class="reference-text">page 2</span>
|
||||
</li>
|
||||
</ol></li>
|
||||
</ol></div>
|
||||
!! end
|
||||
|
||||
# TODO: This currently renders as if the extends="…" is not there
|
||||
# TODO: Render a helpful error message to make this issue visible
|
||||
# TODO: Find a way to render this properly
|
||||
!! test
|
||||
T240424 - Extended reference reused before defined in the <references> section
|
||||
!! config
|
||||
wgCiteBookReferencing=true
|
||||
!! wikitext
|
||||
<ref name="a" />
|
||||
<ref name="b" />
|
||||
<references>
|
||||
<ref name="b" extends="a">page 2</ref>
|
||||
<ref name="a">book</ref>
|
||||
</references>
|
||||
!! html
|
||||
<p><sup id="cite_ref-a_1-0" class="reference"><a href="#cite_note-a-1">[1]</a></sup>
|
||||
<sup id="cite_ref-b_2-0" class="reference"><a href="#cite_note-b-2">[2]</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">book</span>
|
||||
</li>
|
||||
<li id="cite_note-b-2"><span class="mw-cite-backlink"><a href="#cite_ref-b_2-0">↑</a></span> <span class="reference-text">page 2</span>
|
||||
</li>
|
||||
</ol></div>
|
||||
!! end
|
||||
|
||||
# TODO: The two identical tags should be merged into one
|
||||
!! test
|
||||
T240459 - References should be merged when they have the exact same content
|
||||
|
|
Loading…
Reference in a new issue