Arlolra has uploaded a new change for review. https://gerrit.wikimedia.org/r/232313
Change subject: WIP: Edited nowiki content should invalidate the nowiki ...................................................................... WIP: Edited nowiki content should invalidate the nowiki * VE leaves behind nowiki spans in edited content. That may be a bug, but regardless, Parsoid should discard them and only reapply where necessary. This should be safe in that the original nowikis brought us to the present semantics and if serialization doesn't preserve them, that's just a bug in general. The drawback being that this may lead to expanded nowiki ranges. * The current behaviour leads to some ugly orphaned nowikis as in, https://www.mediawiki.org/wiki/Talk:Parsoid/Normalizations#An_empty_nowiki_tag_without_anything_at_the_end_of_the_line Change-Id: I83cfe76620eb9751f59a51c1beaffbf4512c5912 --- M tests/parserTests-blacklist.js M tests/parserTests.txt 2 files changed, 17 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid refs/changes/13/232313/1 diff --git a/tests/parserTests-blacklist.js b/tests/parserTests-blacklist.js index 7121684..de78eba 100644 --- a/tests/parserTests-blacklist.js +++ b/tests/parserTests-blacklist.js @@ -2544,6 +2544,7 @@ add("selser", "Normalizations should be restricted to edited content [1,2,0,0,0]", "a\n\n8uc2mhvuqc7kfbt9\n\n= =\nb"); add("selser", "Normalizations should be restricted to edited content [1,2,2,3,0]", "a\n\n8bevm5ajbpo561or\n\nqjal98t96jgrdx6r\n\n= =\nb"); add("selser", "4a. Table cells without escapable prefixes after edits manual", "{|\n| id=\"x\" | -\n|}"); +add("selser", "Edited nowiki content should invalidate the nowiki manual", "<nowiki>hi</nowiki>"); // ### DO NOT REMOVE THIS LINE ### (end of automatically-generated section) diff --git a/tests/parserTests.txt b/tests/parserTests.txt index d9514a7..83753ff 100644 --- a/tests/parserTests.txt +++ b/tests/parserTests.txt @@ -25688,6 +25688,22 @@ <nowiki>''foo''</nowiki> !! end +!! test +Edited nowiki content should invalidate the nowiki +!! options +parsoid={ + "modes": ["selser"], + "scrubWikitext": true, + "changes": [ + [ "span", "html", "hi" ] + ] +} +!! wikitext +<nowiki>''hi''</nowiki> +!! wikitext/edited +hi +!! end + # --------------------------------------------------- # End of tests spec'ing wikitext serialization norms | # --------------------------------------------------- -- To view, visit https://gerrit.wikimedia.org/r/232313 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I83cfe76620eb9751f59a51c1beaffbf4512c5912 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/parsoid Gerrit-Branch: master Gerrit-Owner: Arlolra <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
