Cscott has uploaded a new change for review.

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

Change subject: Follow-up: fix WTS of autolink-like text after [^W]
......................................................................

Follow-up: fix WTS of autolink-like text after [^W]

Update a parser test to show that we've fixed this bug now.

The html2wt output of one test changes slightly in the parser tests
blacklist because we are going down a slightly different path in
wts.escape now.

Bug: T78425
Bug: T108563
Change-Id: I053bdaedf82beef81c0a675e0a32a4459cf9f053
---
M tests/parserTests-blacklist.js
M tests/parserTests.txt
2 files changed, 2 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid 
refs/changes/68/232068/1

diff --git a/tests/parserTests-blacklist.js b/tests/parserTests-blacklist.js
index 31ac2e0..5802270 100644
--- a/tests/parserTests-blacklist.js
+++ b/tests/parserTests-blacklist.js
@@ -960,7 +960,7 @@
 add("html2wt", "Magic Word: {{PAGENAME}} with metacharacters", 
"''<nowiki/>'foo & bar = baz'''\n");
 add("html2wt", "Magic Word: {{PAGENAME}} with metacharacters (bug 26781)", 
"<nowiki>*RFC 1234 http://example.com/</nowiki>\n");
 add("html2wt", "Magic Word: {{PAGENAMEE}}", 
"%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason\n");
-add("html2wt", "Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)", 
"<nowiki>*</nowiki>RFC_1234_http://example.com/\n";);
+add("html2wt", "Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)", 
"<nowiki>*RFC_1234_http://example.com/</nowiki>\n");
 add("html2wt", "Magic Word: {{REVISIONID}}", "1337\n");
 add("html2wt", "Magic Word: {{SCRIPTPATH}}", "/\n");
 add("html2wt", "Magic Word: {{STYLEPATH}}", "/skins\n");
@@ -1415,7 +1415,6 @@
 add("html2wt", "Lists: 3. Only bullets at start of text should be escaped", "* 
<nowiki>*foo*bar</nowiki>\n\n* <nowiki>*foo</nowiki>''it''*bar\n");
 add("html2wt", "Lists: 4. No escapes needed", "* foo*bar\n\n* ''foo''*bar\n\n* 
[[Foo]]: bar\n\n* [[Foo]]*bar\n");
 add("html2wt", "HRs: 1. Single line", 
"----\n<nowiki>----</nowiki>\n----\n<nowiki>=foo=</nowiki>\n----\n<nowiki>*</nowiki>foo\n");
-add("html2wt", "Links 14. Protect link-like plain text. (Parsoid bug T78425)", 
"this is not a link: http://example.com\n";);
 add("html2wt", "1. Leading whitespace in SOL context should be escaped", 
"<nowiki> </nowiki>a\n\n<nowiki> </nowiki> a\n\n\ta(tab)\n\n 
\ta\n\n<!--cmt--><nowiki> </nowiki> a\n\na\n<nowiki> 
</nowiki>b\n\na\n\tb\n\na\n\t b\n");
 add("html2wt", "3. Leading whitespace in indent-pre suppressing contexts 
should not be escaped", "<blockquote>\n\n a\n <span>b</span>\n 
c\n</blockquote>");
 add("html2wt", "HTML tag with 'unnecessary' entity encoding in attributes", 
"<span title=\"&\">foo</span>\n");
diff --git a/tests/parserTests.txt b/tests/parserTests.txt
index 1f3f427..5ca2221 100644
--- a/tests/parserTests.txt
+++ b/tests/parserTests.txt
@@ -22808,7 +22808,7 @@
 <p>this is not a link: http://example.com
 </p>
 !! wikitext
-this is not a link: <nowiki>http://example.com</nowiki>
+<nowiki>this is not a link: http://example.com</nowiki>
 !! end
 
 !! test

-- 
To view, visit https://gerrit.wikimedia.org/r/232068
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I053bdaedf82beef81c0a675e0a32a4459cf9f053
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Cscott <[email protected]>

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

Reply via email to