Subramanya Sastry has uploaded a new change for review.

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


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(-)


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

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: newchange
Gerrit-Change-Id: I502f838f55a0a7c046b9d5969a8e5fb6af0dbc10
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry <[email protected]>

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

Reply via email to