Subramanya Sastry has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/401588 )
Change subject: Linter: Don't crash while detecting fostered content
......................................................................
Linter: Don't crash while detecting fostered content
* Discovered while testing the linter-reparse script on
pages in the fostered linter category on itwiki.
Change-Id: I8ca6c9c966876cb3b14f7442244533f84a8e0aeb
---
M lib/wt2html/pp/processors/linter.js
1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid
refs/changes/88/401588/1
diff --git a/lib/wt2html/pp/processors/linter.js
b/lib/wt2html/pp/processors/linter.js
index 90c21c2..1394fab 100644
--- a/lib/wt2html/pp/processors/linter.js
+++ b/lib/wt2html/pp/processors/linter.js
@@ -387,6 +387,10 @@
maybeTable = maybeTable.nextSibling;
}
+ if (!maybeTable) {
+ return null;
+ }
+
// In pathological cases, we might walk past fostered nodes
// that carry templating information. This then triggers
// other errors downstream. So, walk back to that first node
--
To view, visit https://gerrit.wikimedia.org/r/401588
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8ca6c9c966876cb3b14f7442244533f84a8e0aeb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits