jenkins-bot has submitted this change and it was merged.
Change subject: Tweaks to td-fixup code
......................................................................
Tweaks to td-fixup code
1. The tokenizer never inserts a closing </td> tag. So, non-HTML
<td>s will always have their closing tag auto-inserted by
the HTML treebuilder ==> auto-inserted-end check for <td> tags
is not required.
2. The test requires a check of whether nextNode is a wrapper element
of a transclusion. DU.isTplElementNode is meant to check for content
produced by a template and only identifies top-level wrapper elements
currently. But, it could easily be changed in the future to identify
all template content nodes. So, I used DU.isEncapsulatedElt instead.
In a separate patch, it might be useful renaming and clarifying the
semantics of these two seemingly similar functions.
Change-Id: Ibfcae0862055eeca0debbbe846e194d29577d1e1
---
M js/lib/dom.t.TDFixups.js
1 file changed, 2 insertions(+), 4 deletions(-)
Approvals:
GWicke: Looks good to me, approved
jenkins-bot: Verified
diff --git a/js/lib/dom.t.TDFixups.js b/js/lib/dom.t.TDFixups.js
index 1555094..e5ea8ee 100644
--- a/js/lib/dom.t.TDFixups.js
+++ b/js/lib/dom.t.TDFixups.js
@@ -11,13 +11,11 @@
var nextNode = node.nextSibling;
if (!DU.isLiteralHTMLNode(node) &&
- // FIXME: will not be set within template content!
- node.data.parsoid.autoInsertedEnd === true &&
nextNode !== null &&
nextNode.nodeName === 'TD' &&
!DU.isLiteralHTMLNode(nextNode) &&
- // FIXME: will not be set within template content!
- DU.isTplElementNode(env, nextNode) &&
+ // FIXME: will not be set for nested templates
+ DU.isEncapsulatedElt(nextNode) &&
DU.nodeEssentiallyEmpty(node))
{
// Update the dsr. Since we are coalescing the first
--
To view, visit https://gerrit.wikimedia.org/r/79586
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ibfcae0862055eeca0debbbe846e194d29577d1e1
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry <[email protected]>
Gerrit-Reviewer: Cscott <[email protected]>
Gerrit-Reviewer: GWicke <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits