jenkins-bot has submitted this change and it was merged.

Change subject: Use span with css instead of strong for cite errors
......................................................................


Use span with css instead of strong for cite errors

Change-Id: I9b8954b56646ca9c4632788824346e6116de3146
---
M Cite_body.php
M citeParserTests.txt
M modules/ext.cite.styles.css
3 files changed, 34 insertions(+), 29 deletions(-)

Approvals:
  WMDE-Fisch: Looks good to me, but someone else must approve
  WMDE-leszek: Looks good to me, but someone else must approve
  Jdlrobson: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/Cite_body.php b/Cite_body.php
index 53a8c0a..4bcab61 100644
--- a/Cite_body.php
+++ b/Cite_body.php
@@ -1290,7 +1290,7 @@
                } else {
                        $this->mParser->addTrackingCategory( 
'cite-tracking-category-cite-error' );
 
-                       $ret = '<strong class="error mw-ext-cite-error">' . 
$msg . '</strong>';
+                       $ret = '<span class="error mw-ext-cite-error">' . $msg 
. '</span>';
                }
 
                if ( $parse === 'parse' ) {
diff --git a/citeParserTests.txt b/citeParserTests.txt
index 0073ede..9a4e62b 100644
--- a/citeParserTests.txt
+++ b/citeParserTests.txt
@@ -210,7 +210,7 @@
 </p><p><sup id="cite_ref-blank_1-1" class="reference"><a 
href="#cite_note-blank-1">[1]</a></sup>
 </p>
 <ol class="references">
-<li id="cite_note-blank-1"><span class="mw-cite-backlink">↑ <sup><a 
href="#cite_ref-blank_1-0">1.0</a></sup> <sup><a 
href="#cite_ref-blank_1-1">1.1</a></sup></span> <span class="reference-text">0 
<strong class="error mw-ext-cite-error">Cite error: Invalid 
<code>&lt;ref&gt;</code> tag; name "blank" defined multiple times with 
different content</strong></span>
+<li id="cite_note-blank-1"><span class="mw-cite-backlink">↑ <sup><a 
href="#cite_ref-blank_1-0">1.0</a></sup> <sup><a 
href="#cite_ref-blank_1-1">1.1</a></sup></span> <span class="reference-text">0 
<span class="error mw-ext-cite-error">Cite error: Invalid 
<code>&lt;ref&gt;</code> tag; name "blank" defined multiple times with 
different content</span></span>
 </li>
 </ol>
 
@@ -229,7 +229,7 @@
 </p><p><sup id="cite_ref-blank_1-1" class="reference"><a 
href="#cite_note-blank-1">[1]</a></sup>
 </p>
 <ol class="references">
-<li id="cite_note-blank-1"><span class="mw-cite-backlink">↑ <sup><a 
href="#cite_ref-blank_1-0">1.0</a></sup> <sup><a 
href="#cite_ref-blank_1-1">1.1</a></sup></span> <span class="reference-text">1 
<strong class="error mw-ext-cite-error">Cite error: Invalid 
<code>&lt;ref&gt;</code> tag; name "blank" defined multiple times with 
different content</strong></span>
+<li id="cite_note-blank-1"><span class="mw-cite-backlink">↑ <sup><a 
href="#cite_ref-blank_1-0">1.0</a></sup> <sup><a 
href="#cite_ref-blank_1-1">1.1</a></sup></span> <span class="reference-text">1 
<span class="error mw-ext-cite-error">Cite error: Invalid 
<code>&lt;ref&gt;</code> tag; name "blank" defined multiple times with 
different content</span></span>
 </li>
 </ol>
 
@@ -276,23 +276,23 @@
 
 <references />
 !! result
-<p><strong class="error mw-ext-cite-error">Cite error: Invalid 
<code>&lt;ref&gt;</code> tag;
-name cannot be a simple integer. Use a descriptive title</strong>
+<p><span class="error mw-ext-cite-error">Cite error: Invalid 
<code>&lt;ref&gt;</code> tag;
+name cannot be a simple integer. Use a descriptive title</span>
 </p><p><sup id="cite_ref-1" class="reference"><a 
href="#cite_note-1">[1]</a></sup>
-</p><p><strong class="error mw-ext-cite-error">Cite error: The opening 
<code>&lt;ref&gt;</code> tag is malformed or has a bad name</strong>
+</p><p><span class="error mw-ext-cite-error">Cite error: The opening 
<code>&lt;ref&gt;</code> tag is malformed or has a bad name</span>
 </p><p><sup id="cite_ref-bar_2-0" class="reference"><a 
href="#cite_note-bar-2">[2]</a></sup>
 </p><p><sup id="cite_ref-blankwithnoreference_3-0" class="reference"><a 
href="#cite_note-blankwithnoreference-3">[3]</a></sup>
-</p><p><strong class="error mw-ext-cite-error">Cite error: Invalid 
<code>&lt;references&gt;</code> tag;
+</p><p><span class="error mw-ext-cite-error">Cite error: Invalid 
<code>&lt;references&gt;</code> tag;
 parameter "group" is allowed only.
-Use <code>&lt;references /&gt;</code>, or <code>&lt;references group="..." 
/&gt;</code></strong>
+Use <code>&lt;references /&gt;</code>, or <code>&lt;references group="..." 
/&gt;</code></span>
 </p>
 <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>
-<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>&lt;ref&gt;</code> tag;
-no text was provided for refs named <code>bar</code></strong></li>
-<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>&lt;ref&gt;</code> tag;
-no text was provided for refs named 
<code>blankwithnoreference</code></strong></li>
+<li id="cite_note-bar-2"><span class="mw-cite-backlink"><a 
href="#cite_ref-bar_2-0">↑</a></span> <span class="error 
mw-ext-cite-error">Cite error: Invalid <code>&lt;ref&gt;</code> tag;
+no text was provided for refs named <code>bar</code></span></li>
+<li id="cite_note-blankwithnoreference-3"><span class="mw-cite-backlink"><a 
href="#cite_ref-blankwithnoreference_3-0">↑</a></span> <span class="error 
mw-ext-cite-error">Cite error: Invalid <code>&lt;ref&gt;</code> tag;
+no text was provided for refs named 
<code>blankwithnoreference</code></span></li>
 </ol>
 
 !! end
@@ -399,12 +399,12 @@
 <p><sup id="cite_ref-foo_1-0" class="reference"><a href="#cite_note-foo-1">[2 
1]</a></sup>
 </p>
 <ol class="references">
-<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>&lt;ref&gt;</code> tag;
-no text was provided for refs named <code>foo</code></strong></li>
+<li id="cite_note-foo-1"><span class="mw-cite-backlink"><a 
href="#cite_ref-foo_1-0">↑</a></span> <span class="error 
mw-ext-cite-error">Cite error: Invalid <code>&lt;ref&gt;</code> tag;
+no text was provided for refs named <code>foo</code></span></li>
 </ol>
-<p><strong class="error mw-ext-cite-error">Cite error: 
<code>&lt;ref&gt;</code> tag with name "unused" defined in 
<code>&lt;references&gt;</code> is not used in prior text.</strong><br />
-<strong class="error mw-ext-cite-error">Cite error: <code>&lt;ref&gt;</code> 
tag in <code>&lt;references&gt;</code> has conflicting group attribute 
"1".</strong><br />
-<strong class="error mw-ext-cite-error">Cite error: <code>&lt;ref&gt;</code> 
tag defined in <code>&lt;references&gt;</code> has no name attribute.</strong>
+<p><span class="error mw-ext-cite-error">Cite error: <code>&lt;ref&gt;</code> 
tag with name "unused" defined in <code>&lt;references&gt;</code> is not used 
in prior text.</span><br />
+<span class="error mw-ext-cite-error">Cite error: <code>&lt;ref&gt;</code> tag 
in <code>&lt;references&gt;</code> has conflicting group attribute 
"1".</span><br />
+<span class="error mw-ext-cite-error">Cite error: <code>&lt;ref&gt;</code> tag 
defined in <code>&lt;references&gt;</code> has no name attribute.</span>
 </p>
 !! end
 
@@ -473,8 +473,8 @@
 !! input
 Bla.<ref></ref>
 !! result
-<p>Bla.<strong class="error mw-ext-cite-error">Cite error: Invalid 
<code>&lt;ref&gt;</code> tag;
-refs with no name must have content</strong>
+<p>Bla.<span class="error mw-ext-cite-error">Cite error: Invalid 
<code>&lt;ref&gt;</code> tag;
+refs with no name must have content</span>
 </p>
 !! end
 
@@ -483,8 +483,8 @@
 !! input
 Bla.<ref name=""></ref>
 !! result
-<p>Bla.<strong class="error mw-ext-cite-error">Cite error: Invalid 
<code>&lt;ref&gt;</code> tag;
-refs with no name must have content</strong>
+<p>Bla.<span class="error mw-ext-cite-error">Cite error: Invalid 
<code>&lt;ref&gt;</code> tag;
+refs with no name must have content</span>
 </p>
 !! end
 
@@ -494,8 +494,8 @@
 Bla.<ref name="void"></ref>
 !! result
 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-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>&lt;ref&gt;</code> tag;
-no text was provided for refs named <code>void</code></strong></li>
+<li id="cite_note-void-1"><span class="mw-cite-backlink"><a 
href="#cite_ref-void_1-0">↑</a></span> <span class="error 
mw-ext-cite-error">Cite error: Invalid <code>&lt;ref&gt;</code> tag;
+no text was provided for refs named <code>void</code></span></li>
 </ol>
 
 !! end
@@ -527,8 +527,8 @@
 Page one.<ref name="the-name" follow="the-name">This ref is invalid.</ref>
 <references />
 !! result
-<p>Page one.<strong class="error mw-ext-cite-error">Cite error: Invalid 
<code>&lt;ref&gt;</code> tag;
-invalid names, e.g. too many</strong>
+<p>Page one.<span class="error mw-ext-cite-error">Cite error: Invalid 
<code>&lt;ref&gt;</code> tag;
+invalid names, e.g. too many</span>
 </p>
 !! end
 
@@ -543,7 +543,7 @@
 <sup id="cite_ref-a_1-1" class="reference"><a 
href="#cite_note-a-1">[1]</a></sup>
 </p>
 <ol class="references">
-<li id="cite_note-a-1"><span class="mw-cite-backlink">↑ <sup><a 
href="#cite_ref-a_1-0">1.0</a></sup> <sup><a 
href="#cite_ref-a_1-1">1.1</a></sup></span> <span class="reference-text">abc 
<strong class="error mw-ext-cite-error">Cite error: Invalid 
<code>&lt;ref&gt;</code> tag; name "a" defined multiple times with different 
content</strong></span>
+<li id="cite_note-a-1"><span class="mw-cite-backlink">↑ <sup><a 
href="#cite_ref-a_1-0">1.0</a></sup> <sup><a 
href="#cite_ref-a_1-1">1.1</a></sup></span> <span class="reference-text">abc 
<span class="error mw-ext-cite-error">Cite error: Invalid 
<code>&lt;ref&gt;</code> tag; name "a" defined multiple times with different 
content</span></span>
 </li>
 </ol>
 
@@ -561,7 +561,7 @@
 <p><sup id="cite_ref-a_1-0" class="reference"><a 
href="#cite_note-a-1">[1]</a></sup>
 </p>
 <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">abc <strong 
class="error mw-ext-cite-error">Cite error: Invalid <code>&lt;ref&gt;</code> 
tag; name "a" defined multiple times with different content</strong></span>
+<li id="cite_note-a-1"><span class="mw-cite-backlink"><a 
href="#cite_ref-a_1-0">↑</a></span> <span class="reference-text">abc <span 
class="error mw-ext-cite-error">Cite error: Invalid <code>&lt;ref&gt;</code> 
tag; name "a" defined multiple times with different content</span></span>
 </li>
 </ol>
 
@@ -578,7 +578,7 @@
 <p><sup id="cite_ref-a_1-0" class="reference"><a 
href="#cite_note-a-1">[1]</a></sup>
 </p>
 <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">abc <strong 
class="error mw-ext-cite-error">Cite error: Invalid <code>&lt;ref&gt;</code> 
tag; name "a" defined multiple times with different content</strong></span>
+<li id="cite_note-a-1"><span class="mw-cite-backlink"><a 
href="#cite_ref-a_1-0">↑</a></span> <span class="reference-text">abc <span 
class="error mw-ext-cite-error">Cite error: Invalid <code>&lt;ref&gt;</code> 
tag; name "a" defined multiple times with different content</span></span>
 </li>
 </ol>
 
@@ -596,7 +596,7 @@
 <p><sup id="cite_ref-a_1-0" class="reference"><a 
href="#cite_note-a-1">[1]</a></sup>
 </p>
 <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">abc <strong 
class="error mw-ext-cite-error">Cite error: Invalid <code>&lt;ref&gt;</code> 
tag; name "a" defined multiple times with different content</strong></span>
+<li id="cite_note-a-1"><span class="mw-cite-backlink"><a 
href="#cite_ref-a_1-0">↑</a></span> <span class="reference-text">abc <span 
class="error mw-ext-cite-error">Cite error: Invalid <code>&lt;ref&gt;</code> 
tag; name "a" defined multiple times with different content</span></span>
 </li>
 </ol>
 
diff --git a/modules/ext.cite.styles.css b/modules/ext.cite.styles.css
index b836fff..e3e0095 100644
--- a/modules/ext.cite.styles.css
+++ b/modules/ext.cite.styles.css
@@ -19,3 +19,8 @@
        background-color: #def; /* fallback */
        background-color: rgba(0, 127, 255, 0.133);
 }
+
+/* Make cite errors "strong" */
+.mw-ext-cite-error {
+       font-weight: bold;
+}

-- 
To view, visit https://gerrit.wikimedia.org/r/271466
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I9b8954b56646ca9c4632788824346e6116de3146
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Cite
Gerrit-Branch: master
Gerrit-Owner: Cenarium <[email protected]>
Gerrit-Reviewer: Addshore <[email protected]>
Gerrit-Reviewer: Cenarium <[email protected]>
Gerrit-Reviewer: Jackmcbarn <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: Tobias Gritschacher <[email protected]>
Gerrit-Reviewer: WMDE-Fisch <[email protected]>
Gerrit-Reviewer: WMDE-leszek <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to