mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-15 19:10:15 +00:00
#cite_note and #cite_ref links generated from empty references are broken
Bug: T126241 Change-Id: I1e84d3361424e57e9f115a665f77d686a80a9135
This commit is contained in:
parent
c859818a70
commit
216b60cb9a
|
@ -756,13 +756,6 @@ class Cite {
|
||||||
$this->referencesKey( $val['follow'] ),
|
$this->referencesKey( $val['follow'] ),
|
||||||
$text
|
$text
|
||||||
)->inContentLanguage()->plain();
|
)->inContentLanguage()->plain();
|
||||||
} elseif ( !isset( $val['text'] ) ) {
|
|
||||||
return wfMessage(
|
|
||||||
'cite_references_link_one',
|
|
||||||
$this->referencesKey( $key ),
|
|
||||||
$this->refKey( $key, $val['count'] ),
|
|
||||||
$text
|
|
||||||
)->inContentLanguage()->plain();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $val['count'] < 0 ) {
|
if ( $val['count'] < 0 ) {
|
||||||
|
|
|
@ -290,9 +290,9 @@ Use <code><references /></code>, or <code><references group="..." />
|
||||||
<ol class="references">
|
<ol class="references">
|
||||||
<li id="cite_note-1"><span class="mw-cite-backlink"><a href="#cite_ref-1">↑</a></span> <span class="reference-text">Also zero, but differently! (Normal ref)</span>
|
<li id="cite_note-1"><span class="mw-cite-backlink"><a href="#cite_ref-1">↑</a></span> <span class="reference-text">Also zero, but differently! (Normal ref)</span>
|
||||||
</li>
|
</li>
|
||||||
<li id="cite_note-bar"><span class="mw-cite-backlink"><a href="#cite_ref-bar_0">↑</a></span> <strong class="error mw-ext-cite-error">Cite error: Invalid <code><ref></code> tag;
|
<li id="cite_note-bar-2"><span class="mw-cite-backlink"><a href="#cite_ref-bar_2-0">↑</a></span> <strong class="error mw-ext-cite-error">Cite error: Invalid <code><ref></code> tag;
|
||||||
no text was provided for refs named <code>bar</code></strong></li>
|
no text was provided for refs named <code>bar</code></strong></li>
|
||||||
<li id="cite_note-blankwithnoreference"><span class="mw-cite-backlink"><a href="#cite_ref-blankwithnoreference_0">↑</a></span> <strong class="error mw-ext-cite-error">Cite error: Invalid <code><ref></code> tag;
|
<li id="cite_note-blankwithnoreference-3"><span class="mw-cite-backlink"><a href="#cite_ref-blankwithnoreference_3-0">↑</a></span> <strong class="error mw-ext-cite-error">Cite error: Invalid <code><ref></code> tag;
|
||||||
no text was provided for refs named <code>blankwithnoreference</code></strong></li>
|
no text was provided for refs named <code>blankwithnoreference</code></strong></li>
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
|
@ -400,7 +400,7 @@ AAA<ref group="参">ref a</ref>BBB<ref group="注">note b</ref>CCC<ref group="
|
||||||
<p><sup id="cite_ref-foo_1-0" class="reference"><a href="#cite_note-foo-1">[2 1]</a></sup>
|
<p><sup id="cite_ref-foo_1-0" class="reference"><a href="#cite_note-foo-1">[2 1]</a></sup>
|
||||||
</p>
|
</p>
|
||||||
<ol class="references">
|
<ol class="references">
|
||||||
<li id="cite_note-foo"><span class="mw-cite-backlink"><a href="#cite_ref-foo_0">↑</a></span> <strong class="error mw-ext-cite-error">Cite error: Invalid <code><ref></code> tag;
|
<li id="cite_note-foo-1"><span class="mw-cite-backlink"><a href="#cite_ref-foo_1-0">↑</a></span> <strong class="error mw-ext-cite-error">Cite error: Invalid <code><ref></code> tag;
|
||||||
no text was provided for refs named <code>foo</code></strong></li>
|
no text was provided for refs named <code>foo</code></strong></li>
|
||||||
</ol>
|
</ol>
|
||||||
<p><strong class="error mw-ext-cite-error">Cite error: <code><ref></code> tag with name "unused" defined in <code><references></code> is not used in prior text.</strong><br />
|
<p><strong class="error mw-ext-cite-error">Cite error: <code><ref></code> tag with name "unused" defined in <code><references></code> is not used in prior text.</strong><br />
|
||||||
|
@ -495,7 +495,7 @@ refs with no name must have content</strong>
|
||||||
Bla.<ref name="void"></ref>
|
Bla.<ref name="void"></ref>
|
||||||
!! result
|
!! result
|
||||||
Bla.<sup id="cite_ref-void_1-0" class="reference"><a href="#cite_note-void-1">[1]</a></sup><ol class="references">
|
Bla.<sup id="cite_ref-void_1-0" class="reference"><a href="#cite_note-void-1">[1]</a></sup><ol class="references">
|
||||||
<li id="cite_note-void"><span class="mw-cite-backlink"><a href="#cite_ref-void_0">↑</a></span> <strong class="error mw-ext-cite-error">Cite error: Invalid <code><ref></code> tag;
|
<li id="cite_note-void-1"><span class="mw-cite-backlink"><a href="#cite_ref-void_1-0">↑</a></span> <strong class="error mw-ext-cite-error">Cite error: Invalid <code><ref></code> tag;
|
||||||
no text was provided for refs named <code>void</code></strong></li>
|
no text was provided for refs named <code>void</code></strong></li>
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue