mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-28 00:40:12 +00:00
Don't add empty title attributes to anchor links
All parser tests updated.
This commit is contained in:
parent
87d06b1ef4
commit
245673a16c
|
@ -9,7 +9,7 @@ Simple <ref>, no <references/>
|
|||
!! input
|
||||
Wikipedia rocks!<ref>Proceeds of Rockology, vol. XXI</ref>
|
||||
!! result
|
||||
<p>Wikipedia rocks!<sup id="cite_ref-0" class="reference"><a href="#cite_note-0" title="">[1]</a></sup>
|
||||
<p>Wikipedia rocks!<sup id="cite_ref-0" class="reference"><a href="#cite_note-0">[1]</a></sup>
|
||||
</p>
|
||||
<br /><strong class="error">Cite error: <code><ref></code> tags exist, but no <code><references/></code> tag was found</strong>
|
||||
!! end
|
||||
|
@ -21,9 +21,9 @@ Wikipedia rocks!<ref>Proceeds of Rockology, vol. XXI</ref>
|
|||
|
||||
<references/>
|
||||
!! result
|
||||
<p>Wikipedia rocks!<sup id="cite_ref-0" class="reference"><a href="#cite_note-0" title="">[1]</a></sup>
|
||||
<p>Wikipedia rocks!<sup id="cite_ref-0" class="reference"><a href="#cite_note-0">[1]</a></sup>
|
||||
</p>
|
||||
<ol class="references"><li id="cite_note-0"><a href="#cite_ref-0" title="">↑</a> Proceeds of Rockology, vol. XXI</li></ol>
|
||||
<ol class="references"><li id="cite_note-0"><a href="#cite_ref-0">↑</a> Proceeds of Rockology, vol. XXI</li></ol>
|
||||
|
||||
!! end
|
||||
|
||||
|
@ -42,9 +42,9 @@ Templating<ref>{{simple template}}</ref>
|
|||
|
||||
<references/>
|
||||
!! result
|
||||
<p>Templating<sup id="cite_ref-0" class="reference"><a href="#cite_note-0" title="">[1]</a></sup>
|
||||
<p>Templating<sup id="cite_ref-0" class="reference"><a href="#cite_note-0">[1]</a></sup>
|
||||
</p>
|
||||
<ol class="references"><li id="cite_note-0"><a href="#cite_ref-0" title="">↑</a> A <i>simple</i> template.</li></ol>
|
||||
<ol class="references"><li id="cite_note-0"><a href="#cite_ref-0">↑</a> A <i>simple</i> template.</li></ol>
|
||||
|
||||
!! end
|
||||
|
||||
|
@ -55,9 +55,9 @@ Templating<ref><nowiki>{{simple template}}</nowiki></ref>
|
|||
|
||||
<references/>
|
||||
!! result
|
||||
<p>Templating<sup id="cite_ref-0" class="reference"><a href="#cite_note-0" title="">[1]</a></sup>
|
||||
<p>Templating<sup id="cite_ref-0" class="reference"><a href="#cite_note-0">[1]</a></sup>
|
||||
</p>
|
||||
<ol class="references"><li id="cite_note-0"><a href="#cite_ref-0" title="">↑</a> {{simple template}}</li></ol>
|
||||
<ol class="references"><li id="cite_note-0"><a href="#cite_ref-0">↑</a> {{simple template}}</li></ol>
|
||||
|
||||
!! end
|
||||
|
||||
|
@ -93,9 +93,9 @@ Templating<ref>Text<!--comment--></ref>
|
|||
|
||||
<references/>
|
||||
!! result
|
||||
<p>Templating<sup id="cite_ref-0" class="reference"><a href="#cite_note-0" title="">[1]</a></sup>
|
||||
<p>Templating<sup id="cite_ref-0" class="reference"><a href="#cite_note-0">[1]</a></sup>
|
||||
</p>
|
||||
<ol class="references"><li id="cite_note-0"><a href="#cite_ref-0" title="">↑</a> Text</li></ol>
|
||||
<ol class="references"><li id="cite_note-0"><a href="#cite_ref-0">↑</a> Text</li></ol>
|
||||
|
||||
!! end
|
||||
|
||||
|
@ -108,7 +108,7 @@ Templating<ref>Text<!--comment--></ref>
|
|||
|
||||
<references/>
|
||||
!! result
|
||||
<p><sup id="cite_ref-0" class="reference"><a href="#cite_note-0" title="">[1]</a></sup>
|
||||
<p><sup id="cite_ref-0" class="reference"><a href="#cite_note-0">[1]</a></sup>
|
||||
</p>
|
||||
<table class="gallery" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
|
@ -119,7 +119,7 @@ Templating<ref>Text<!--comment--></ref>
|
|||
</div></td>
|
||||
</tr>
|
||||
</table>
|
||||
<ol class="references"><li id="cite_note-0"><a href="#cite_ref-0" title="">↑</a> one</li></ol>
|
||||
<ol class="references"><li id="cite_note-0"><a href="#cite_ref-0">↑</a> one</li></ol>
|
||||
|
||||
!! end
|
||||
|
||||
|
@ -128,7 +128,7 @@ Templating<ref>Text<!--comment--></ref>
|
|||
!! input
|
||||
{{REVISIONID}}<ref>elite</ref>
|
||||
!! result
|
||||
<p>1337<sup id="cite_ref-0" class="reference"><a href="#cite_note-0" title="">[1]</a></sup>
|
||||
<p>1337<sup id="cite_ref-0" class="reference"><a href="#cite_note-0">[1]</a></sup>
|
||||
</p>
|
||||
<br /><strong class="error">Cite error: <code><ref></code> tags exist, but no <code><references/></code> tag was found</strong>
|
||||
!! end
|
||||
|
@ -151,10 +151,10 @@ Blank ref followed by ref with content
|
|||
|
||||
<references/>
|
||||
!! result
|
||||
<p><sup id="cite_ref-blank_0-0" class="reference"><a href="#cite_note-blank-0" title="">[1]</a></sup>
|
||||
</p><p><sup id="cite_ref-blank_0-1" class="reference"><a href="#cite_note-blank-0" title="">[1]</a></sup>
|
||||
<p><sup id="cite_ref-blank_0-0" class="reference"><a href="#cite_note-blank-0">[1]</a></sup>
|
||||
</p><p><sup id="cite_ref-blank_0-1" class="reference"><a href="#cite_note-blank-0">[1]</a></sup>
|
||||
</p>
|
||||
<ol class="references"><li id="cite_note-blank-0">↑ <sup><a href="#cite_ref-blank_0-0" title="">1.0</a></sup> <sup><a href="#cite_ref-blank_0-1" title="">1.1</a></sup> content</li></ol>
|
||||
<ol class="references"><li id="cite_note-blank-0">↑ <sup><a href="#cite_ref-blank_0-0">1.0</a></sup> <sup><a href="#cite_ref-blank_0-1">1.1</a></sup> content</li></ol>
|
||||
|
||||
!! end
|
||||
|
||||
|
@ -167,10 +167,10 @@ Regression: non-blank ref "0" followed by ref with content
|
|||
|
||||
<references/>
|
||||
!! result
|
||||
<p><sup id="cite_ref-blank_0-0" class="reference"><a href="#cite_note-blank-0" title="">[1]</a></sup>
|
||||
</p><p><sup id="cite_ref-blank_0-1" class="reference"><a href="#cite_note-blank-0" title="">[1]</a></sup>
|
||||
<p><sup id="cite_ref-blank_0-0" class="reference"><a href="#cite_note-blank-0">[1]</a></sup>
|
||||
</p><p><sup id="cite_ref-blank_0-1" class="reference"><a href="#cite_note-blank-0">[1]</a></sup>
|
||||
</p>
|
||||
<ol class="references"><li id="cite_note-blank-0">↑ <sup><a href="#cite_ref-blank_0-0" title="">1.0</a></sup> <sup><a href="#cite_ref-blank_0-1" title="">1.1</a></sup> 0</li></ol>
|
||||
<ol class="references"><li id="cite_note-blank-0">↑ <sup><a href="#cite_ref-blank_0-0">1.0</a></sup> <sup><a href="#cite_ref-blank_0-1">1.1</a></sup> 0</li></ol>
|
||||
|
||||
!! end
|
||||
|
||||
|
@ -183,10 +183,10 @@ Regression sanity check: non-blank ref "1" followed by ref with content
|
|||
|
||||
<references/>
|
||||
!! result
|
||||
<p><sup id="cite_ref-blank_0-0" class="reference"><a href="#cite_note-blank-0" title="">[1]</a></sup>
|
||||
</p><p><sup id="cite_ref-blank_0-1" class="reference"><a href="#cite_note-blank-0" title="">[1]</a></sup>
|
||||
<p><sup id="cite_ref-blank_0-0" class="reference"><a href="#cite_note-blank-0">[1]</a></sup>
|
||||
</p><p><sup id="cite_ref-blank_0-1" class="reference"><a href="#cite_note-blank-0">[1]</a></sup>
|
||||
</p>
|
||||
<ol class="references"><li id="cite_note-blank-0">↑ <sup><a href="#cite_ref-blank_0-0" title="">1.0</a></sup> <sup><a href="#cite_ref-blank_0-1" title="">1.1</a></sup> 1</li></ol>
|
||||
<ol class="references"><li id="cite_note-blank-0">↑ <sup><a href="#cite_ref-blank_0-0">1.0</a></sup> <sup><a href="#cite_ref-blank_0-1">1.1</a></sup> 1</li></ol>
|
||||
|
||||
!! end
|
||||
|
||||
|
@ -199,13 +199,13 @@ Ref names containing a number
|
|||
|
||||
<references />
|
||||
!! result
|
||||
<p><sup id="cite_ref-test123test_0-0" class="reference"><a href="#cite_note-test123test-0" title="">[1]</a></sup>
|
||||
<sup id="cite_ref-123test_1-0" class="reference"><a href="#cite_note-123test-1" title="">[2]</a></sup>
|
||||
<sup id="cite_ref-test123_2-0" class="reference"><a href="#cite_note-test123-2" title="">[3]</a></sup>
|
||||
<p><sup id="cite_ref-test123test_0-0" class="reference"><a href="#cite_note-test123test-0">[1]</a></sup>
|
||||
<sup id="cite_ref-123test_1-0" class="reference"><a href="#cite_note-123test-1">[2]</a></sup>
|
||||
<sup id="cite_ref-test123_2-0" class="reference"><a href="#cite_note-test123-2">[3]</a></sup>
|
||||
</p>
|
||||
<ol class="references"><li id="cite_note-test123test-0"><a href="#cite_ref-test123test_0-0" title="">↑</a> One</li>
|
||||
<li id="cite_note-123test-1"><a href="#cite_ref-123test_1-0" title="">↑</a> Two</li>
|
||||
<li id="cite_note-test123-2"><a href="#cite_ref-test123_2-0" title="">↑</a> Three</li></ol>
|
||||
<ol class="references"><li id="cite_note-test123test-0"><a href="#cite_ref-test123test_0-0">↑</a> One</li>
|
||||
<li id="cite_note-123test-1"><a href="#cite_ref-123test_1-0">↑</a> Two</li>
|
||||
<li id="cite_note-test123-2"><a href="#cite_ref-test123_2-0">↑</a> Three</li></ol>
|
||||
|
||||
!! end
|
||||
|
||||
|
@ -230,21 +230,21 @@ Erroneous refs
|
|||
!! result
|
||||
<p><strong class="error">Cite error: Invalid <code><ref></code> tag;
|
||||
name cannot be a simple integer. Use a descriptive title</strong>
|
||||
</p><p><sup id="cite_ref-0" class="reference"><a href="#cite_note-0" title="">[1]</a></sup>
|
||||
</p><p><sup id="cite_ref-0" class="reference"><a href="#cite_note-0">[1]</a></sup>
|
||||
</p><p><strong class="error">Cite error: Invalid <code><ref></code> tag;
|
||||
refs with no content must have a name</strong>
|
||||
</p><p><sup id="cite_ref-bar_1-0" class="reference"><a href="#cite_note-bar-1" title="">[2]</a></sup>
|
||||
</p><p><sup id="cite_ref-blankwithnoreference_2-0" class="reference"><a href="#cite_note-blankwithnoreference-2" title="">[3]</a></sup>
|
||||
</p><p><sup id="cite_ref-bar_1-0" class="reference"><a href="#cite_note-bar-1">[2]</a></sup>
|
||||
</p><p><sup id="cite_ref-blankwithnoreference_2-0" class="reference"><a href="#cite_note-blankwithnoreference-2">[3]</a></sup>
|
||||
</p><p><strong class="error">Cite error: Invalid <code><references></code> tag;
|
||||
no input is allowed. Use <code><references /></code></strong>
|
||||
</p><p><strong class="error">Cite error: Invalid <code><references></code> tag;
|
||||
parameter "group" is allowed only.
|
||||
Use <code><references /></code>, or <code><references group="…" /></code></strong>
|
||||
</p>
|
||||
<ol class="references"><li id="cite_note-0"><a href="#cite_ref-0" title="">↑</a> Also zero, but differently! (Normal ref)</li>
|
||||
<li id="cite_note-bar"><a href="#cite_ref-bar_0" title="">↑</a> <strong class="error">Cite error: Invalid <code><ref></code> tag;
|
||||
<ol class="references"><li id="cite_note-0"><a href="#cite_ref-0">↑</a> Also zero, but differently! (Normal ref)</li>
|
||||
<li id="cite_note-bar"><a href="#cite_ref-bar_0">↑</a> <strong class="error">Cite error: Invalid <code><ref></code> tag;
|
||||
no text was provided for refs named <code>bar</code></strong></li>
|
||||
<li id="cite_note-blankwithnoreference"><a href="#cite_ref-blankwithnoreference_0" title="">↑</a> <strong class="error">Cite error: Invalid <code><ref></code> tag;
|
||||
<li id="cite_note-blankwithnoreference"><a href="#cite_ref-blankwithnoreference_0">↑</a> <strong class="error">Cite error: Invalid <code><ref></code> tag;
|
||||
no text was provided for refs named <code>blankwithnoreference</code></strong></li></ol>
|
||||
|
||||
!! end
|
||||
|
@ -259,11 +259,11 @@ Wikipedia rocks!<ref group=note>Proceeds of Rockology, vol. XXI</ref>
|
|||
<references/>
|
||||
<references group=note/>
|
||||
!! result
|
||||
<p>Wikipedia rocks!<sup id="cite_ref-0" class="reference"><a href="#cite_note-0" title="">[1]</a></sup>
|
||||
Wikipedia rocks!<sup id="cite_ref-1" class="reference"><a href="#cite_note-1" title="">[note 1]</a></sup>
|
||||
<p>Wikipedia rocks!<sup id="cite_ref-0" class="reference"><a href="#cite_note-0">[1]</a></sup>
|
||||
Wikipedia rocks!<sup id="cite_ref-1" class="reference"><a href="#cite_note-1">[note 1]</a></sup>
|
||||
</p>
|
||||
<ol class="references"><li id="cite_note-0"><a href="#cite_ref-0" title="">↑</a> Proceeds of Rockology, vol. XXI</li></ol>
|
||||
<ol class="references"><li id="cite_note-1"><a href="#cite_ref-1" title="">↑</a> Proceeds of Rockology, vol. XXI</li></ol>
|
||||
<ol class="references"><li id="cite_note-0"><a href="#cite_ref-0">↑</a> Proceeds of Rockology, vol. XXI</li></ol>
|
||||
<ol class="references"><li id="cite_note-1"><a href="#cite_ref-1">↑</a> Proceeds of Rockology, vol. XXI</li></ol>
|
||||
|
||||
!! end
|
||||
|
||||
|
@ -277,14 +277,14 @@ AAA<ref group="参">ref a</ref>BBB<ref group="注">note b</ref>CCC<ref group="
|
|||
;notes
|
||||
<references group="注" />
|
||||
!! result
|
||||
<p>AAA<sup id="cite_ref-0" class="reference"><a href="#cite_note-0" title="">[参 1]</a></sup>BBB<sup id="cite_ref-1" class="reference"><a href="#cite_note-1" title="">[注 1]</a></sup>CCC<sup id="cite_ref-2" class="reference"><a href="#cite_note-2" title="">[参 2]</a></sup>
|
||||
<p>AAA<sup id="cite_ref-0" class="reference"><a href="#cite_note-0">[参 1]</a></sup>BBB<sup id="cite_ref-1" class="reference"><a href="#cite_note-1">[注 1]</a></sup>CCC<sup id="cite_ref-2" class="reference"><a href="#cite_note-2">[参 2]</a></sup>
|
||||
</p>
|
||||
<dl><dt>refs
|
||||
</dt></dl>
|
||||
<ol class="references"><li id="cite_note-0"><a href="#cite_ref-0" title="">↑</a> ref a</li>
|
||||
<li id="cite_note-2"><a href="#cite_ref-2" title="">↑</a> ref c</li></ol>
|
||||
<ol class="references"><li id="cite_note-0"><a href="#cite_ref-0">↑</a> ref a</li>
|
||||
<li id="cite_note-2"><a href="#cite_ref-2">↑</a> ref c</li></ol>
|
||||
<dl><dt>notes
|
||||
</dt></dl>
|
||||
<ol class="references"><li id="cite_note-1"><a href="#cite_ref-1" title="">↑</a> note b</li></ol>
|
||||
<ol class="references"><li id="cite_note-1"><a href="#cite_ref-1">↑</a> note b</li></ol>
|
||||
|
||||
!! end
|
||||
|
|
Loading…
Reference in a new issue