jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/386313 )

Change subject: T176728: Use replaceChild instead of insertBefore
......................................................................


T176728: Use replaceChild instead of insertBefore

Change-Id: I855b7d3c67859a35eb411701f4f14450ca939988
---
M lib/wt2html/pp/processors/wrapTemplates.js
1 file changed, 1 insertion(+), 3 deletions(-)

Approvals:
  Subramanya Sastry: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/lib/wt2html/pp/processors/wrapTemplates.js 
b/lib/wt2html/pp/processors/wrapTemplates.js
index 8181605..15eb165 100644
--- a/lib/wt2html/pp/processors/wrapTemplates.js
+++ b/lib/wt2html/pp/processors/wrapTemplates.js
@@ -664,9 +664,7 @@
                                if (!DU.isFosterablePosition(n)) {
                                        var span = doc.createElement('span');
                                        span.setAttribute('about', about);
-                                       // attach the new span to the DOM
-                                       n.parentNode.insertBefore(span, n);
-                                       // move the text node into the span
+                                       n.parentNode.replaceChild(span, n);
                                        span.appendChild(n);
                                        n = span;
                                }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I855b7d3c67859a35eb411701f4f14450ca939988
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra <abrea...@wikimedia.org>
Gerrit-Reviewer: Subramanya Sastry <ssas...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to