Arlolra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/406049 )

Change subject: Stop clearing tplInfo if don't find a table for fostered content
......................................................................

Stop clearing tplInfo if don't find a table for fostered content

Also, remove some commented out code that should have gone with dd4bda7

Fixes the following and others,
http://localhost:8000/en.wikipedia.org/v3/page/html/Phulwari_(Vidhan_Sabha_constituency)/793701085
http://localhost:8000/en.wikipedia.org/v3/page/html/User%3ADylanrocks96%2Fsandbox/776441874

Bug: T185346
Change-Id: Ib3c635715ed8936e514e4e8f2f725ab345921f76
---
M lib/wt2html/pp/processors/linter.js
1 file changed, 5 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid 
refs/changes/49/406049/1

diff --git a/lib/wt2html/pp/processors/linter.js 
b/lib/wt2html/pp/processors/linter.js
index 7d093e4..55206a7 100644
--- a/lib/wt2html/pp/processors/linter.js
+++ b/lib/wt2html/pp/processors/linter.js
@@ -377,15 +377,19 @@
  */
 function logFosteredContent(env, node, dp, tplInfo) {
        var maybeTable = node.nextSibling;
+       var clear = false;
+
        while (maybeTable && !DU.hasNodeName(maybeTable, 'table')) {
                if (tplInfo && maybeTable === tplInfo.last) {
-                       tplInfo.clear = true;
+                       clear = true;
                }
                maybeTable = maybeTable.nextSibling;
        }
 
        if (!maybeTable) {
                return null;
+       } else if (clear && tplInfo) {
+               tplInfo.clear = true;
        }
 
        // In pathological cases, we might walk past fostered nodes
@@ -832,21 +836,7 @@
 function logWikitextFixups(node, env, tplInfo) {
        var dp = DU.getDataParsoid(node);
 
-       /*
-        * Turn this off since this is wasted processing
-        * that is not really actionable at this time.
-        *
-       if (tplInfo && tplInfo.first === node) {
-               // Log transclusions with more than one part
-               logTransclusions(env, node, dp, tplInfo);
-       }
-       */
-
        logTreeBuilderFixup(env, node, dp, tplInfo);
-       // Turning this off for now since
-       // (a) this needs fixing (b) not exposed in linter extension output yet
-       // (c) this is source of error logspam in kibana
-       // logIgnoredTableAttr(env, node, dp, tplInfo);
        logDeletableTables(env, node, dp, tplInfo); // For T161341
        logBadPWrapping(env, node, dp, tplInfo);    // For T161306
        logObsoleteHTMLTags(env, node, dp, tplInfo);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib3c635715ed8936e514e4e8f2f725ab345921f76
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra <abrea...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to