jenkins-bot has submitted this change and it was merged.

Change subject: Adjust parser test output for overlapping inline html.
......................................................................


Adjust parser test output for overlapping inline html.

Our wt2html output for this test case seems to have shifted over time.

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

Approvals:
  Subramanya Sastry: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/tests/parserTests-blacklist.js b/tests/parserTests-blacklist.js
index f2c2a7d..b636351 100644
--- a/tests/parserTests-blacklist.js
+++ b/tests/parserTests-blacklist.js
@@ -388,7 +388,6 @@
 add("wt2html", "anchorencode trims spaces", "<p 
data-parsoid='{\"dsr\":[0,36,0,0]}'><span typeof=\"mw:Transclusion\" 
about=\"#mwt1\" id=\"mwt1\" 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"anchorencode: 
__pretty__please__\",\"function\":\"anchorencode\"},\"params\":{},\"i\":0}}]}' 
data-parsoid='{\"src\":\"{{anchorencode: 
__pretty__please__}}\",\"dsr\":[0,36,null,null],\"pi\":[[]]}'>__pretty__please__</span></p>");
 add("wt2html", "anchorencode deals with links", "<p 
data-parsoid='{\"dsr\":[0,40,0,0]}'><span typeof=\"mw:Transclusion\" 
about=\"#mwt1\" id=\"mwt1\" 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"anchorencode: 
[[hello|world]] 
[[hi]]\",\"function\":\"anchorencode\"},\"params\":{},\"i\":0}}]}' 
data-parsoid='{\"src\":\"{{anchorencode: [[hello|world]] 
[[hi]]}}\",\"dsr\":[0,40,null,null],\"pi\":[[]]}'>world hi</span></p>");
 add("wt2html", "anchorencode encodes like the TOC generator: (bug 18431)", 
"<h3 data-parsoid='{\"dsr\":[0,26,3,3]}'> _ +:.3A%3A&amp;<span 
typeof=\"mw:Entity\" 
data-parsoid='{\"src\":\"&amp;amp;\",\"srcContent\":\"&amp;\",\"dsr\":[15,20,null,null]}'>&amp;</span>]]
 </h3>\n<p data-parsoid='{\"dsr\":[27,82,0,0]}'><span 
typeof=\"mw:Transclusion\" about=\"#mwt1\" id=\"mwt1\" 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"anchorencode: _ 
+:.3A%3A&amp;&amp;amp;]] 
\",\"function\":\"anchorencode\"},\"params\":{},\"i\":0}}]}' 
data-parsoid='{\"dsr\":[27,64,null,null],\"pi\":[[]]}'>_ 
+:.3A%3A&amp;&amp;]]</span>\n<meta property=\"mw:PageProp/noeditsection\" 
data-parsoid='{\"src\":\"__NOEDITSECTION__\",\"magicSrc\":\"__NOEDITSECTION__\",\"dsr\":[65,82,null,null]}'/></p>");
-add("wt2html", "Parsing of overlapping (improperly nested) inline html tags", 
"<p data-parsoid='{\"dsr\":[0,21,0,0]}'><span 
data-parsoid='{\"stx\":\"html\",\"dsr\":[0,17,6,7]}'><s 
data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[6,10,3,0]}'>x</s></span></p>");
 add("wt2html", "Self-link in language variants", "<p 
data-parsoid='{\"dsr\":[0,54,0,0]}'>Both <a rel=\"mw:WikiLink\" 
href=\"./Dunav\" 
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Dunav\"},\"sa\":{\"href\":\"Dunav\"},\"dsr\":[5,14,2,2]}'>Dunav</a>
 and <a rel=\"mw:WikiLink\" href=\"./Дунав\" 
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Дунав\"},\"sa\":{\"href\":\"Дунав\"},\"dsr\":[19,28,2,2]}'>Дунав</a>
 are names for this river.</p>");
 add("wt2html", "Link to another existing title shouldn't be parsed as 
self-link even if it's a variant of this title", "<p 
data-parsoid='{\"dsr\":[0,77,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Дуна\" 
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Дуна\"},\"sa\":{\"href\":\"Дуна\"},\"dsr\":[0,8,2,2]}'>Дуна</a>
 is not a self-link while <a rel=\"mw:WikiLink\" href=\"./Duna\" 
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Duna\"},\"sa\":{\"href\":\"Duna\"},\"dsr\":[34,42,2,2]}'>Duna</a>
 and <a rel=\"mw:WikiLink\" href=\"./Dуна\" 
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Dуна\"},\"sa\":{\"href\":\"Dуна\"},\"dsr\":[47,55,2,2]}'>Dуна</a>
 are still self-links.</p>");
 add("wt2html", "Link to a section of a variant of this title shouldn't be 
parsed as self-link", "<p data-parsoid='{\"dsr\":[0,79,0,0]}'><a 
rel=\"mw:WikiLink\" href=\"./Dуна\" 
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Dуна\"},\"sa\":{\"href\":\"Dуна\"},\"dsr\":[0,8,2,2]}'>Dуна</a>
 is a self-link while <a rel=\"mw:WikiLink\" href=\"./Dunа#Foo\" 
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Dunа#Foo\"},\"sa\":{\"href\":\"Dunа#Foo\"},\"dsr\":[30,42,2,2]}'>Dunа#Foo</a>
 and <a rel=\"mw:WikiLink\" href=\"./Dуна#Foo\" 
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Dуна#Foo\"},\"sa\":{\"href\":\"Dуна#Foo\"},\"dsr\":[47,59,2,2]}'>Dуна#Foo</a>
 are not self-links.</p>");
@@ -1972,7 +1971,7 @@
 add("html2wt", "anchorencode encodes like the TOC generator: (bug 18431)", 
"=== <span class=\"mw-headline\" id=\".2B:.3A.253A.26.26.5D.5D\">_ 
+:.3A%3A&&]]</span> ===\n.2B:.3A.253A.26.26.5D.5D\n");
 add("html2wt", "Bug 6200: blockquotes and paragraph formatting", 
"<blockquote>\nfoo\n\n</blockquote>\nbar\n\n baz\n");
 add("html2wt", "Bug 8293: Use of center tag ruins paragraph formatting", 
"<center>\nfoo\n\n</center>\nbar\n\n baz\n");
-add("html2wt", "Parsing of overlapping (improperly nested) inline html tags", 
"<span><s>x</s></span><s></s>\n");
+add("html2wt", "Parsing of overlapping (improperly nested) inline html tags", 
"<span><s>x</s></span>\n");
 add("html2wt", "Self-link in language variants", "Both <strong 
class=\"selflink\">Dunav</strong> and <strong class=\"selflink\">Дунав</strong> 
are names for this river.\n");
 add("html2wt", "Link to another existing title shouldn't be parsed as 
self-link even if it's a variant of this title", "<a 
href=\"/wiki/%D0%94%D1%83%D0%BD%D0%B0\" title=\"Дуна\">Дуна</a> is not a 
self-link while <strong class=\"selflink\">Duna</strong> and <strong 
class=\"selflink\">Dуна</strong> are still self-links.\n");
 add("html2wt", "Link to a section of a variant of this title shouldn't be 
parsed as self-link", "<strong class=\"selflink\">Dуна</strong> is a self-link 
while <a href=\"/wiki/%D0%94%D1%83%D0%BD%D0%B0\" title=\"Дуна\">Dunа#Foo</a> 
and <a href=\"/wiki/%D0%94%D1%83%D0%BD%D0%B0\" title=\"Дуна\">Dуна#Foo</a> are 
not self-links.\n");
diff --git a/tests/parserTests.txt b/tests/parserTests.txt
index af5ad3c..e8f3b4e 100644
--- a/tests/parserTests.txt
+++ b/tests/parserTests.txt
@@ -15634,7 +15634,7 @@
 <p><span><s>x&lt;/span&gt;</s></span>
 </p>
 !! html/parsoid
-<p><span><s>x</s></span><s></s>
+<p><span><s>x</s></span>
 </p>
 !!end
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I560cad8785f76f9129970c8dc588b1a045315fb8
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Cscott <canan...@wikimedia.org>
Gerrit-Reviewer: Cscott <canan...@wikimedia.org>
Gerrit-Reviewer: GWicke <gwi...@wikimedia.org>
Gerrit-Reviewer: Subramanya Sastry <ssas...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to