GWicke has submitted this change and it was merged. Change subject: Handle newlines better ......................................................................
Handle newlines better This patch adds in a bunch of new handling for lastdsr and startdsr, as well as a bunch of special handling for newlines. Roughly, there are improvements to how we actually handle the startdsr/lastdsr state, meaning that we catch instances like * There's a child element that was modified, but all subsequent nodes didn't have a dsr[0]. Use the dsr[1] of the last modified node. * There's a newline-only element that was modified, and that comes right before an unmodified element. Special-case handling will now catch the newlines. Remaining problems include * Extra newlines between a modified element and an unmodified one. * Some instances of totally stripped nodes, cause unknown I've also included a test case that should fail in the previous commit and work now. The test name is "Paragraphs with extra newline spacing". Note that the selser test-runner's new "import changes" feature actually won't work without this patch, so it may be difficult to test. Change-Id: Ic15b979942e95e10eea966dfdbd6e075eb04af03 --- M js/lib/mediawiki.SelectiveSerializer.js M js/lib/mediawiki.WikitextSerializer.js A js/tests/parserTests.changes.txt M js/tests/parserTests.js 4 files changed, 122 insertions(+), 54 deletions(-) Approvals: GWicke: Verified; Looks good to me, approved -- To view, visit https://gerrit.wikimedia.org/r/35425 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic15b979942e95e10eea966dfdbd6e075eb04af03 Gerrit-PatchSet: 12 Gerrit-Project: mediawiki/extensions/Parsoid Gerrit-Branch: master Gerrit-Owner: MarkTraceur <[email protected]> Gerrit-Reviewer: GWicke <[email protected]> Gerrit-Reviewer: MarkTraceur <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
