jenkins-bot has submitted this change and it was merged.
Change subject: Minor: Cleanup and comment update.
......................................................................
Minor: Cleanup and comment update.
Change-Id: I502f838f55a0a7c046b9d5969a8e5fb6af0dbc10
---
M js/lib/ext.Cite.js
M js/lib/ext.core.ParagraphWrapper.js
2 files changed, 6 insertions(+), 4 deletions(-)
Approvals:
GWicke: Looks good to me, approved
jenkins-bot: Verified
diff --git a/js/lib/ext.Cite.js b/js/lib/ext.Cite.js
index 7292434..d5ff31a 100644
--- a/js/lib/ext.Cite.js
+++ b/js/lib/ext.Cite.js
@@ -467,6 +467,10 @@
refsNode.setAttribute('data-mw', dataMW);
// Remove all children from the references node
+ //
+ // Ex: When {{Reflist}} is reused from the cache, it comes with
+ // a bunch of references as well. We have to remove all those cached
+ // references before generating fresh references.
while (refsNode.firstChild) {
refsNode.removeChild(refsNode.firstChild);
}
diff --git a/js/lib/ext.core.ParagraphWrapper.js
b/js/lib/ext.core.ParagraphWrapper.js
index 264a418..a6ff51e 100644
--- a/js/lib/ext.core.ParagraphWrapper.js
+++ b/js/lib/ext.core.ParagraphWrapper.js
@@ -187,16 +187,14 @@
if (newLineCount === 2) {
this.closeOpenPTag(resToks);
resToks.push(this.discardOneNlTk(resToks));
- nlTk = this.discardOneNlTk(resToks);
- resToks.push(nlTk);
+ resToks.push(this.discardOneNlTk(resToks));
}
}
if (isBlockToken) {
if (newLineCount === 1){
this.closeOpenPTag(resToks);
- nlTk = this.discardOneNlTk(resToks);
- resToks.push(nlTk);
+ resToks.push(this.discardOneNlTk(resToks));
} else {
this.closeOpenPTag(resToks);
}
--
To view, visit https://gerrit.wikimedia.org/r/91555
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I502f838f55a0a7c046b9d5969a8e5fb6af0dbc10
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry <[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