GWicke has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/93090


Change subject: Don't assume that trs are two wide, and check for null before 
marking as html
......................................................................

Don't assume that trs are two wide, and check for null before marking as html

Change-Id: I98d091c66591bff2811f3b420f3a7c3c337c587c
---
M js/lib/dom.markTreeBuilderFixups.js
M js/lib/mediawiki.wikitext.constants.js
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid 
refs/changes/90/93090/1

diff --git a/js/lib/dom.markTreeBuilderFixups.js 
b/js/lib/dom.markTreeBuilderFixups.js
index aa71748..6f9ab29 100644
--- a/js/lib/dom.markTreeBuilderFixups.js
+++ b/js/lib/dom.markTreeBuilderFixups.js
@@ -185,7 +185,7 @@
                                                // a literal HTML end tag (ex: 
</tr>) from the source.
                                                // But, ignore HTML tags that 
dont have wikitext tags at all.
                                                var wtTagWidth = 
Consts.WT_TagWidths[cNodeName];
-                                               if (wtTagWidth && wtTagWidth[0] 
!== 0 && wtTagWidth[1] === 0) {
+                                               if (wtTagWidth && wtTagWidth[0] 
!== null && wtTagWidth[0] !== 0 && wtTagWidth[1] === 0) {
                                                        dp.stx = 'html';
                                                }
                                        }
diff --git a/js/lib/mediawiki.wikitext.constants.js 
b/js/lib/mediawiki.wikitext.constants.js
index 4d49ad5..f10b6c8 100644
--- a/js/lib/mediawiki.wikitext.constants.js
+++ b/js/lib/mediawiki.wikitext.constants.js
@@ -231,7 +231,7 @@
                "h6"    : [6,6],
                "hr"    : [4,0],
                "table" : [2,2],
-               "tr"    : [2,0],
+               "tr"    : [null,0],
                "td"    : [null,0],
                "th"    : [null,0],
                "b"     : [3,3],

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I98d091c66591bff2811f3b420f3a7c3c337c587c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: GWicke <[email protected]>

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

Reply via email to