jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/389113 )

Change subject: T179757: Linter: Fix false positive for tidy-font-bug
......................................................................


T179757: Linter: Fix false positive for tidy-font-bug

Change-Id: I04345253cf4950ba4e9b3140951e377ac2c53cf1
---
M lib/wt2html/pp/handlers/linter.js
M tests/mocha/linter.js
2 files changed, 2 insertions(+), 1 deletion(-)

Approvals:
  jenkins-bot: Verified
  Arlolra: Looks good to me, approved



diff --git a/lib/wt2html/pp/handlers/linter.js 
b/lib/wt2html/pp/handlers/linter.js
index d50a5ec..8c7d550 100644
--- a/lib/wt2html/pp/handlers/linter.js
+++ b/lib/wt2html/pp/handlers/linter.js
@@ -479,7 +479,7 @@
                 * specifies a link colour because the link no longer renders
                 * as blue/red but in the font-specified colour.
                 * ---------------------------------------------------------- */
-               var tidyFontBug = true;
+               var tidyFontBug = c.firstChild !== null;
                var haveLink = false;
                for (var n = c.firstChild; n; n = n.nextSibling) {
                        if (!DU.isComment(n) &&
diff --git a/tests/mocha/linter.js b/tests/mocha/linter.js
index be4fe7d..2fa672a 100644
--- a/tests/mocha/linter.js
+++ b/tests/mocha/linter.js
@@ -777,6 +777,7 @@
                        });
                });
                var wtLines2 = [
+                       "<font color='green'></font>", // Regression test for 
T179757
                        "<font color='green'>[[Foo]][[Bar]]</font>",
                        "<font color='green'> [[Foo]]</font>",
                        "<font color='green'>[[Foo]] </font>",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I04345253cf4950ba4e9b3140951e377ac2c53cf1
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry <[email protected]>
Gerrit-Reviewer: Arlolra <[email protected]>
Gerrit-Reviewer: C. Scott Ananian <[email protected]>
Gerrit-Reviewer: Sbailey <[email protected]>
Gerrit-Reviewer: Subramanya Sastry <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to