Arlolra has uploaded a new change for review.
https://gerrit.wikimedia.org/r/79088
Change subject: Handle stray closing pre tag in ParagraphWrapper.
......................................................................
Handle stray closing pre tag in ParagraphWrapper.
The source of /ko/오프라_윈프리 seems to have a stray </pre> tag that
ParagraphWrapper couldn't handle. It caused an unnecessary state
transition.
Change-Id: I1cc00e91ba826d0df0eafefd85cc931855e2b8a6
---
M js/lib/ext.core.ParagraphWrapper.js
1 file changed, 5 insertions(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid
refs/changes/88/79088/1
diff --git a/js/lib/ext.core.ParagraphWrapper.js
b/js/lib/ext.core.ParagraphWrapper.js
index ccad2c5..2bd9440 100644
--- a/js/lib/ext.core.ParagraphWrapper.js
+++ b/js/lib/ext.core.ParagraphWrapper.js
@@ -292,9 +292,11 @@
// No pre-tokens inside html-p-tags -- swallow it.
return {};
} else {
-
this.manager.addTransform(this.onNewLineOrEOF.bind(this),
- "ParagraphWrapper:onNewLine", this.newlineRank,
'newline');
- this.inPre = false;
+ if ( this.inPre ) {
+
this.manager.addTransform(this.onNewLineOrEOF.bind(this),
+ "ParagraphWrapper:onNewLine",
this.newlineRank, 'newline');
+ this.inPre = false;
+ }
this.currLine.hasBlockToken = true;
return { tokens: [token] };
}
--
To view, visit https://gerrit.wikimedia.org/r/79088
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1cc00e91ba826d0df0eafefd85cc931855e2b8a6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits