[MediaWiki-commits] [Gerrit] Fix crasher in template wrapping (introduced in 54b4f37bb). - change (mediawiki...parsoid)
Subramanya Sastry has uploaded a new change for review. https://gerrit.wikimedia.org/r/130607 Change subject: Fix crasher in template wrapping (introduced in 54b4f37bb). .. Fix crasher in template wrapping (introduced in 54b4f37bb). Change-Id: Id640287cc1107d6491b850c863a1980dc111ef76 --- M lib/dom.wrapTemplates.js 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid refs/changes/07/130607/1 diff --git a/lib/dom.wrapTemplates.js b/lib/dom.wrapTemplates.js index 266cf83..e4968c9 100644 --- a/lib/dom.wrapTemplates.js +++ b/lib/dom.wrapTemplates.js @@ -596,7 +596,10 @@ }; // Skip template-marker meta-tags - while (DU.isTplMarkerMeta(encapInfo.target)) { + // Also, skip past comments/text nodes found in fosterable positions + // which wouldn't have been span-wrapped in the while-loop above. + while (DU.isTplMarkerMeta(encapInfo.target) || !DU.isElt(encapInfo.target)) { + console.assert(DU.isElt(encapInfo.target) || DU.isFosterablePosition(encapInfo.target)); encapInfo.target = encapInfo.target.nextSibling; } -- To view, visit https://gerrit.wikimedia.org/r/130607 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id640287cc1107d6491b850c863a1980dc111ef76 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/parsoid Gerrit-Branch: master Gerrit-Owner: Subramanya Sastry ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix crasher in template wrapping (introduced in 54b4f37bb). - change (mediawiki...parsoid)
jenkins-bot has submitted this change and it was merged. Change subject: Fix crasher in template wrapping (introduced in 54b4f37bb). .. Fix crasher in template wrapping (introduced in 54b4f37bb). Change-Id: Id640287cc1107d6491b850c863a1980dc111ef76 --- M lib/dom.wrapTemplates.js 1 file changed, 4 insertions(+), 1 deletion(-) Approvals: GWicke: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/dom.wrapTemplates.js b/lib/dom.wrapTemplates.js index 266cf83..e4968c9 100644 --- a/lib/dom.wrapTemplates.js +++ b/lib/dom.wrapTemplates.js @@ -596,7 +596,10 @@ }; // Skip template-marker meta-tags - while (DU.isTplMarkerMeta(encapInfo.target)) { + // Also, skip past comments/text nodes found in fosterable positions + // which wouldn't have been span-wrapped in the while-loop above. + while (DU.isTplMarkerMeta(encapInfo.target) || !DU.isElt(encapInfo.target)) { + console.assert(DU.isElt(encapInfo.target) || DU.isFosterablePosition(encapInfo.target)); encapInfo.target = encapInfo.target.nextSibling; } -- To view, visit https://gerrit.wikimedia.org/r/130607 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id640287cc1107d6491b850c863a1980dc111ef76 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/parsoid Gerrit-Branch: master Gerrit-Owner: Subramanya Sastry Gerrit-Reviewer: Arlolra Gerrit-Reviewer: Cscott Gerrit-Reviewer: GWicke Gerrit-Reviewer: Marcoil Gerrit-Reviewer: Subramanya Sastry Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits