Subramanya Sastry has uploaded a new change for review. Change subject: [Bug 42667]: Treat HTML-pres with 1 opening newline specially. ......................................................................
[Bug 42667]: Treat HTML-pres with 1 opening newline specially. * Browsers always strip the leading newline in a html-pre. So, this makes it hard for the visual editor to distinguish between <pre>foo</pre> and <pre>\nfoo</pre>. It can detect 2+ newline case since a newline is left behind. See [Bug 42667] for details. * When html-pre has a single leading newline, it is stripped and info recorded in data-parsoid (stripping mimics VE behavior and helps us catch regressions). * Consolidated indent-pre and html-pre handling in the DOM into a single post-processor. * TODO: Need to detect scenario when user modifies a tagged pre and inserts additional newlines since VE cannot look into data-parsoid. * No change in parser tests. Change-Id: I8fbef7f075bcb929e934672ccecc0bc636d7e9b0 --- M js/lib/mediawiki.DOMPostProcessor.js M js/lib/mediawiki.WikitextSerializer.js 2 files changed, 56 insertions(+), 33 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid refs/changes/23/36923/1 -- To view, visit https://gerrit.wikimedia.org/r/36923 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8fbef7f075bcb929e934672ccecc0bc636d7e9b0 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
