Arlolra has uploaded a new change for review.

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

Change subject: Sync parserTests with core
......................................................................

Sync parserTests with core

 * Added /php for the two tests with the comment options

 * Removed a newline at the beginning of a test title

 * Newly failing tests are part of categories of tests that need to be
   systematically fixed up with /parsoid sections, __TOC__ and
   definition lists, so punting on that for now.

Change-Id: I032084de3cc47a22b914e5350ebbe79e9c1b9c1a
---
M tests/parserTests-blacklist.js
M tests/parserTests.txt
M tools/fetch-parserTests.txt.js
3 files changed, 66 insertions(+), 8 deletions(-)


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

diff --git a/tests/parserTests-blacklist.js b/tests/parserTests-blacklist.js
index dab2091..17c577e 100644
--- a/tests/parserTests-blacklist.js
+++ b/tests/parserTests-blacklist.js
@@ -597,6 +597,7 @@
 add("html2html", "Multiple tags in TOC", "\n<div id=\"toc\" class=\"toc\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[1,264,26,6]}'>\n<div id=\"toctitle\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[28,69,19,6]}'>\n<h2 
data-parsoid='{\"dsr\":[48,62,2,2]}'> Contents </h2>\n</div>\n\n<ul 
data-parsoid='{\"dsr\":[71,256,0,0]}'><li 
data-parsoid='{\"dsr\":[71,165,1,0]}'> <a rel=\"mw:WikiLink\" 
href=\"./Main_Page#Foo_Bar\" 
data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Main_Page#Foo_Bar\"},\"sa\":{\"href\":\"#Foo_Bar\"},\"dsr\":[73,165,11,2]}'><span
 class=\"tocnumber\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[84,116,24,7]}'>1</span> <span 
class=\"toctext\" data-parsoid='{\"stx\":\"html\",\"dsr\":[117,163,22,7]}'><i 
data-parsoid='{\"dsr\":[139,146,2,2]}'>Foo</i> <b 
data-parsoid='{\"dsr\":[147,156,3,3]}'>Bar</b></span></a></li>\n<li 
data-parsoid='{\"dsr\":[166,256,1,0]}'> <a rel=\"mw:WikiLink\" 
href=\"./Main_Page#Foo_Bar_2\" 
data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Main_Page#Foo_Bar_2\"},\"sa\":{\"href\":\"#Foo_Bar_2\"},\"dsr\":[168,256,13,2]}'><span
 class=\"tocnumber\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[181,213,24,7]}'>2</span> <span 
class=\"toctext\" data-parsoid='{\"stx\":\"html\",\"dsr\":[214,254,22,7]}'><i 
data-parsoid='{\"dsr\":[236,243,2,2]}'>Foo</i> 
Bar</span></a></li></ul>\n\n</div>\n\n<h2 
data-parsoid='{\"dsr\":[266,289,2,2]}'> <i 
data-parsoid='{\"dsr\":[269,276,2,2]}'>Foo</i> <b 
data-parsoid='{\"dsr\":[277,286,3,3]}'>Bar</b> </h2>\n\n<h2 
data-parsoid='{\"dsr\":[291,304,2,2]}'> <i 
data-parsoid='{\"dsr\":[294,301,2,2]}'>Foo</i> </h2>\n<blockquote 
data-parsoid='{\"stx\":\"html\",\"dsr\":[305,335,12,13]}'>\n<p 
data-parsoid='{\"dsr\":[318,321,0,0]}'>Bar</p>\n</blockquote>\n<p 
data-parsoid='{\"dsr\":[336,519,0,0]}'><span class=\"mw-editsection\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[336,519,29,7]}'><span 
class=\"mw-editsection-bracket\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[365,410,37,7]}'>[</span>[/index.php?title=Parser_test&amp;action=edit&amp;section=2
 edit]<span class=\"mw-editsection-bracket\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[467,512,37,7]}'>]</span></span></p>\n");
 add("html2html", "span tags with directionality in TOC", "<div id=\"toc\" 
class=\"toc\" data-parsoid='{\"stx\":\"html\",\"dsr\":[0,952,26,6]}'><div 
id=\"toctitle\" data-parsoid='{\"stx\":\"html\",\"dsr\":[26,67,19,6]}'>\n<h2 
data-parsoid='{\"dsr\":[46,60,2,2]}'> Contents </h2>\n</div>\n\n<ul 
data-parsoid='{\"dsr\":[69,944,0,0]}'><li 
data-parsoid='{\"dsr\":[69,172,1,0]}'> <a rel=\"mw:WikiLink\" 
href=\"./Main_Page#C.2B.2B\" 
data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Main_Page#C.2B.2B\"},\"sa\":{\"href\":\"#C.2B.2B\"},\"dsr\":[71,172,11,2]}'><span
 class=\"tocnumber\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[82,114,24,7]}'>1</span> <span 
class=\"toctext\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[115,170,22,7]}'><span dir=\"ltr\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[137,163,16,7]}'>C++</span></span></a></li>\n<li
 data-parsoid='{\"dsr\":[173,298,1,0]}'> <a rel=\"mw:WikiLink\" 
href=\"./Main_Page#.D7.96.D7.91.D7.A0.D7.92.21\" 
data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Main_Page#.D7.96.D7.91.D7.A0.D7.92.21\"},\"sa\":{\"href\":\"#.D7.96.D7.91.D7.A0.D7.92.21\"},\"dsr\":[175,298,31,2]}'><span
 class=\"tocnumber\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[206,238,24,7]}'>2</span> <span 
class=\"toctext\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[239,296,22,7]}'><span dir=\"rtl\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[261,289,16,7]}'>זבנג!</span></span></a></li>\n<li
 data-parsoid='{\"dsr\":[299,506,1,0]}'> <a rel=\"mw:WikiLink\" 
href=\"./Main_Page#The_attributes_on_these_span_tags_must_be_deleted_from_the_TOC\"
 
data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Main_Page#The_attributes_on_these_span_tags_must_be_deleted_from_the_TOC\"},\"sa\":{\"href\":\"#The_attributes_on_these_span_tags_must_be_deleted_from_the_TOC\"},\"dsr\":[301,506,66,2]}'><span
 class=\"tocnumber\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[367,399,24,7]}'>3</span> <span 
class=\"toctext\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[400,504,22,7]}'><span 
data-parsoid='{\"stx\":\"html\",\"dsr\":[422,497,6,7]}'>The attributes on these 
span tags must be deleted from the TOC</span></span></a></li>\n<li 
data-parsoid='{\"dsr\":[507,714,1,0]}'> <a rel=\"mw:WikiLink\" 
href=\"./Main_Page#All_attributes_on_these_span_tags_must_be_deleted_from_the_TOC\"
 
data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Main_Page#All_attributes_on_these_span_tags_must_be_deleted_from_the_TOC\"},\"sa\":{\"href\":\"#All_attributes_on_these_span_tags_must_be_deleted_from_the_TOC\"},\"dsr\":[509,714,66,2]}'><span
 class=\"tocnumber\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[575,607,24,7]}'>4</span> <span 
class=\"toctext\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[608,712,22,7]}'><span 
data-parsoid='{\"stx\":\"html\",\"dsr\":[630,705,6,7]}'>All attributes on these 
span tags must be deleted from the TOC</span></span></a></li>\n<li 
data-parsoid='{\"dsr\":[715,944,1,0]}'> <a rel=\"mw:WikiLink\" 
href=\"./Main_Page#Attributes_after_dir_on_these_span_tags_must_be_deleted_from_the_TOC\"
 
data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Main_Page#Attributes_after_dir_on_these_span_tags_must_be_deleted_from_the_TOC\"},\"sa\":{\"href\":\"#Attributes_after_dir_on_these_span_tags_must_be_deleted_from_the_TOC\"},\"dsr\":[717,944,72,2]}'><span
 class=\"tocnumber\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[789,821,24,7]}'>5</span> <span 
class=\"toctext\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[822,942,22,7]}'><span dir=\"ltr\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[844,935,16,7]}'>Attributes after dir 
on these span tags must be deleted from the 
TOC</span></span></a></li></ul>\n\n</div>\n\n<h2 
data-parsoid='{\"dsr\":[954,1169,2,2]}'> <span dir=\"ltr\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[957,983,16,7]}'>C++</span><span 
class=\"mw-editsection\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[983,1166,29,7]}'><span 
class=\"mw-editsection-bracket\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[1012,1057,37,7]}'>[</span>[/index.php?title=Parser_test&amp;action=edit&amp;section=1
 edit]<span class=\"mw-editsection-bracket\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[1114,1159,37,7]}'>]</span></span> 
</h2>\n\n<h2 data-parsoid='{\"dsr\":[1171,1388,2,2]}'> <span dir=\"rtl\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[1174,1202,16,7]}'>זבנג!</span><span 
class=\"mw-editsection\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[1202,1385,29,7]}'><span 
class=\"mw-editsection-bracket\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[1231,1276,37,7]}'>[</span>[/index.php?title=Parser_test&amp;action=edit&amp;section=2
 edit]<span class=\"mw-editsection-bracket\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[1333,1378,37,7]}'>]</span></span> 
</h2>\n\n<h2 data-parsoid='{\"dsr\":[1390,1681,2,2]}'> <span 
style=\"font-style: italic\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[1393,1495,33,7]}'>The attributes on 
these span tags must be deleted from the TOC</span><span 
class=\"mw-editsection\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[1495,1678,29,7]}'><span 
class=\"mw-editsection-bracket\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[1524,1569,37,7]}'>[</span>[/index.php?title=Parser_test&amp;action=edit&amp;section=3
 edit]<span class=\"mw-editsection-bracket\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[1626,1671,37,7]}'>]</span></span> 
</h2>\n\n<h2 data-parsoid='{\"dsr\":[1683,1984,2,2]}'> <span 
style=\"font-style: italic\" dir=\"ltr\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[1686,1798,43,7]}'>All attributes on 
these span tags must be deleted from the TOC</span><span 
class=\"mw-editsection\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[1798,1981,29,7]}'><span 
class=\"mw-editsection-bracket\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[1827,1872,37,7]}'>[</span>[/index.php?title=Parser_test&amp;action=edit&amp;section=4
 edit]<span class=\"mw-editsection-bracket\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[1929,1974,37,7]}'>]</span></span> 
</h2>\n\n<h2 data-parsoid='{\"dsr\":[1986,2293,2,2]}'> <span dir=\"ltr\" 
style=\"font-style: italic\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[1989,2107,43,7]}'>Attributes after dir 
on these span tags must be deleted from the TOC</span><span 
class=\"mw-editsection\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[2107,2290,29,7]}'><span 
class=\"mw-editsection-bracket\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[2136,2181,37,7]}'>[</span>[/index.php?title=Parser_test&amp;action=edit&amp;section=5
 edit]<span class=\"mw-editsection-bracket\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[2238,2283,37,7]}'>]</span></span> 
</h2>\n");
 add("html2html", "Bug 72884: bdi element in ToC", "<div id=\"toc\" 
class=\"toc\" data-parsoid='{\"stx\":\"html\",\"dsr\":[0,166,26,6]}'><div 
id=\"toctitle\" data-parsoid='{\"stx\":\"html\",\"dsr\":[26,67,19,6]}'>\n<h2 
data-parsoid='{\"dsr\":[46,60,2,2]}'> Contents </h2>\n</div>\n\n<ul 
data-parsoid='{\"dsr\":[69,158,0,0]}'><li 
data-parsoid='{\"dsr\":[69,158,1,0]}'> <a rel=\"mw:WikiLink\" 
href=\"./Main_Page#test\" 
data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Main_Page#test\"},\"sa\":{\"href\":\"#test\"},\"dsr\":[71,158,8,2]}'><span
 class=\"tocnumber\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[79,111,24,7]}'>1</span> <span 
class=\"toctext\" data-parsoid='{\"stx\":\"html\",\"dsr\":[112,156,22,7]}'><bdi 
data-parsoid='{\"stx\":\"html\",\"dsr\":[134,149,5,6]}'>test</bdi></span></a></li></ul>\n\n</div>\n\n<h2
 data-parsoid='{\"dsr\":[168,189,2,2]}'> <bdi 
data-parsoid='{\"stx\":\"html\",\"dsr\":[171,186,5,6]}'>test</bdi> </h2>\n");
+add("html2html", "T35715: s/strike element in ToC", "<div id=\"toc\" 
class=\"toc\" data-parsoid='{\"stx\":\"html\",\"dsr\":[0,199,26,6]}'><div 
id=\"toctitle\" data-parsoid='{\"stx\":\"html\",\"dsr\":[26,67,19,6]}'>\n<h2 
data-parsoid='{\"dsr\":[46,60,2,2]}'> Contents </h2>\n</div>\n\n<ul 
data-parsoid='{\"dsr\":[69,191,0,0]}'><li 
data-parsoid='{\"dsr\":[69,191,1,0]}'> <a rel=\"mw:WikiLink\" 
href=\"./Main_Page#test_test_test\" 
data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Main_Page#test_test_test\"},\"sa\":{\"href\":\"#test_test_test\"},\"dsr\":[71,191,18,2]}'><span
 class=\"tocnumber\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[89,121,24,7]}'>1</span> <span 
class=\"toctext\" data-parsoid='{\"stx\":\"html\",\"dsr\":[122,189,22,7]}'><s 
data-parsoid='{\"stx\":\"html\",\"dsr\":[144,155,3,4]}'>test</s> test <strike 
data-parsoid='{\"stx\":\"html\",\"dsr\":[161,182,8,9]}'>test</strike></span></a></li></ul>\n\n</div>\n\n<h2
 data-parsoid='{\"dsr\":[201,245,2,2]}'> <s 
data-parsoid='{\"stx\":\"html\",\"dsr\":[204,215,3,4]}'>test</s> test <strike 
data-parsoid='{\"stx\":\"html\",\"dsr\":[221,242,8,9]}'>test</strike> </h2>\n");
 add("html2html", "Empty <p> tag in TOC, removed by Sanitizer (T92892)", 
"\n<div id=\"toc\" class=\"toc\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[1,151,26,6]}'>\n<div id=\"toctitle\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[28,69,19,6]}'>\n<h2 
data-parsoid='{\"dsr\":[48,62,2,2]}'> Contents </h2>\n</div>\n\n<ul 
data-parsoid='{\"dsr\":[71,143,0,0]}'><li 
data-parsoid='{\"dsr\":[71,143,1,0]}'> <a rel=\"mw:WikiLink\" 
href=\"./Main_Page#x\" 
data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Main_Page#x\"},\"sa\":{\"href\":\"#x\"},\"dsr\":[73,143,5,2]}'><span
 class=\"tocnumber\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[78,110,24,7]}'>1</span> <span 
class=\"toctext\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[111,141,22,7]}'>x</span></a></li></ul>\n\n</div>\n\n<h2
 data-parsoid='{\"dsr\":[153,160,2,2]}'> x </h2>\n");
 add("html2html", "nowiki inside link inside heading (bug 18295)", "<h2 
data-parsoid='{\"dsr\":[0,22,2,2]}'> <a rel=\"mw:WikiLink\" href=\"./Wiki/Foo\" 
title=\"Wiki/Foo\" 
data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Foo\"},\"sa\":{\"href\":\"wiki/Foo\"},\"dsr\":[3,19,11,2]}'>xyz</a>
 </h2>\n");
 add("html2html", "new support for bdi element (bug 31817)", "<p 
data-parsoid='{\"dsr\":[0,122,0,0]}'>ולדימיר לנין (ברוסית: <bdi lang=\"ru\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[22,57,15,6]}'>Владимир Ленин</bdi>, 24 
באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>\n");
@@ -699,7 +700,8 @@
 add("html2wt", "Definition lists: self-closed tag", "; one<br>two \n: two-line 
fun\n");
 add("html2wt", "Bug 11748: Literal closing tags", "\n; test 1\n: test test 
test test test\n; test 2\n: test test test test test\n");
 add("html2wt", "Definition and unordered list using wiki syntax nested in 
unordered list using html tags.", "\n*; term \n*: description\n** unordered\n");
-add("html2wt", "\nDefinition list with empty definition and following 
paragraph", "; term\n:\nParagraph text\n");
+add("html2wt", "Definition list with empty definition and following 
paragraph", "; term\n:\nParagraph text\n");
+add("html2wt", "Nested definition lists using html syntax", "; x\n: a\n: b\n");
 add("html2wt", "Definition Lists: No nesting: Multiple dd's", "; x\n: a\n: 
b\n");
 add("html2wt", "Definition Lists: Indentation: Regular", ": i1\n:: i2\n::: 
i3\n");
 add("html2wt", "Definition Lists: Indentation: Missing 1st level", ":: i2\n::: 
i3\n");
@@ -1241,6 +1243,7 @@
 add("html2wt", "Multiple tags in TOC", "\n<div id=\"toc\" class=\"toc\">\n<div 
id=\"toctitle\">\n== Contents ==\n</div>\n\n* [[#Foo_Bar|<span 
class=\"tocnumber\">1</span> <span class=\"toctext\">''Foo'' 
'''Bar'''</span>]]\n* [[#Foo_Bar_2|<span class=\"tocnumber\">2</span> <span 
class=\"toctext\">''Foo'' Bar</span>]]\n\n</div>\n\n== ''Foo'' '''Bar''' 
==\n\n== ''Foo'' ==\n<blockquote>\nBar\n</blockquote>\n<span 
class=\"mw-editsection\"><span 
class=\"mw-editsection-bracket\">[</span>[/index.php?title=Parser_test&action=edit&section=2
 edit]<span class=\"mw-editsection-bracket\">]</span></span>\n");
 add("html2wt", "span tags with directionality in TOC", "<div id=\"toc\" 
class=\"toc\"><div id=\"toctitle\">\n== Contents ==\n</div>\n\n* 
[[#C.2B.2B|<span class=\"tocnumber\">1</span> <span class=\"toctext\"><span 
dir=\"ltr\">C++</span></span>]]\n* [[#.D7.96.D7.91.D7.A0.D7.92.21|<span 
class=\"tocnumber\">2</span> <span class=\"toctext\"><span 
dir=\"rtl\">זבנג!</span></span>]]\n* 
[[#The_attributes_on_these_span_tags_must_be_deleted_from_the_TOC|<span 
class=\"tocnumber\">3</span> <span class=\"toctext\"><span>The attributes on 
these span tags must be deleted from the TOC</span></span>]]\n* 
[[#All_attributes_on_these_span_tags_must_be_deleted_from_the_TOC|<span 
class=\"tocnumber\">4</span> <span class=\"toctext\"><span>All attributes on 
these span tags must be deleted from the TOC</span></span>]]\n* 
[[#Attributes_after_dir_on_these_span_tags_must_be_deleted_from_the_TOC|<span 
class=\"tocnumber\">5</span> <span class=\"toctext\"><span 
dir=\"ltr\">Attributes after dir on these span tags must be deleted from the 
TOC</span></span>]]\n\n</div>\n\n== <span dir=\"ltr\">C++</span><span 
class=\"mw-editsection\"><span 
class=\"mw-editsection-bracket\">[</span>[/index.php?title=Parser_test&action=edit&section=1
 edit]<span class=\"mw-editsection-bracket\">]</span></span> ==\n\n== <span 
dir=\"rtl\">זבנג!</span><span class=\"mw-editsection\"><span 
class=\"mw-editsection-bracket\">[</span>[/index.php?title=Parser_test&action=edit&section=2
 edit]<span class=\"mw-editsection-bracket\">]</span></span> ==\n\n== <span 
style=\"font-style: italic\">The attributes on these span tags must be deleted 
from the TOC</span><span class=\"mw-editsection\"><span 
class=\"mw-editsection-bracket\">[</span>[/index.php?title=Parser_test&action=edit&section=3
 edit]<span class=\"mw-editsection-bracket\">]</span></span> ==\n\n== <span 
style=\"font-style: italic\" dir=\"ltr\">All attributes on these span tags must 
be deleted from the TOC</span><span class=\"mw-editsection\"><span 
class=\"mw-editsection-bracket\">[</span>[/index.php?title=Parser_test&action=edit&section=4
 edit]<span class=\"mw-editsection-bracket\">]</span></span> ==\n\n== <span 
dir=\"ltr\" style=\"font-style: italic\">Attributes after dir on these span 
tags must be deleted from the TOC</span><span class=\"mw-editsection\"><span 
class=\"mw-editsection-bracket\">[</span>[/index.php?title=Parser_test&action=edit&section=5
 edit]<span class=\"mw-editsection-bracket\">]</span></span> ==\n");
 add("html2wt", "Bug 72884: bdi element in ToC", "<div id=\"toc\" 
class=\"toc\"><div id=\"toctitle\">\n== Contents ==\n</div>\n\n* [[#test|<span 
class=\"tocnumber\">1</span> <span 
class=\"toctext\"><bdi>test</bdi></span>]]\n\n</div>\n\n== <bdi>test</bdi> 
==\n");
+add("html2wt", "T35715: s/strike element in ToC", "<div id=\"toc\" 
class=\"toc\"><div id=\"toctitle\">\n== Contents ==\n</div>\n\n* 
[[#test_test_test|<span class=\"tocnumber\">1</span> <span 
class=\"toctext\"><s>test</s> test 
<strike>test</strike></span>]]\n\n</div>\n\n== <s>test</s> test 
<strike>test</strike> ==\n");
 add("html2wt", "Empty <p> tag in TOC, removed by Sanitizer (T92892)", "\n<div 
id=\"toc\" class=\"toc\">\n<div id=\"toctitle\">\n== Contents ==\n</div>\n\n* 
[[#x|<span class=\"tocnumber\">1</span> <span 
class=\"toctext\">x</span>]]\n\n</div>\n\n== x ==\n");
 add("html2wt", "Bug 32057: Title needed when expanding <h> nodes.", "== 
Headline text ==\n");
 add("html2wt", "Strip marker in urlencode", "xy\nxy\nxy\nxy\n");
diff --git a/tests/parserTests.txt b/tests/parserTests.txt
index 2fabd94..536525a 100644
--- a/tests/parserTests.txt
+++ b/tests/parserTests.txt
@@ -35,7 +35,8 @@
 #
 # You can also set the following parser properties via test options:
 #  wgEnableUploads, wgAllowExternalImages, wgMaxTocLevel,
-#  wgLinkHolderBatchSize, wgRawHtml, wgInterwikiMagic
+#  wgLinkHolderBatchSize, wgRawHtml, wgInterwikiMagic,
+#  wgEnableMagicLinks
 #
 # For testing purposes, temporary articles can created:
 # !!article / NAMESPACE:TITLE / !!text / ARTICLE TEXT / !!endarticle
@@ -3662,7 +3663,6 @@
 !! end
 
 !! test
-
 Definition list with empty definition and following paragraph
 !! wikitext
 ; term:
@@ -3677,6 +3677,10 @@
 !! test
 Nested definition lists using html syntax
 !! wikitext
+<dl><dt>x</dt>
+<dd>a</dd>
+<dd>b</dd></dl>
+!! html
 <dl><dt>x</dt>
 <dd>a</dd>
 <dd>b</dd></dl>
@@ -10541,6 +10545,21 @@
 <p>X<a rel="mw:ExtLink" href="//tools.ietf.org/html/rfc1234">foo</a></p>
 !! end
 
+!! test
+Magic links: All disabled (T47942)
+!! options
+wgEnableMagicLinks={"ISBN":false, "PMID":false, "RFC":false}
+!! wikitext
+ISBN 0-306-40615-2
+PMID 1234
+RFC 4321
+!! html/php
+<p>ISBN 0-306-40615-2
+PMID 1234
+RFC 4321
+</p>
+!! end
+
 ###
 ### Templates
 ####
@@ -16690,11 +16709,11 @@
 !! end
 
 !! test
-evil <math>-wiki-tags without Extension:Math enabled
+Tags which are hidden from Tidy cannot pass through the Sanitizer
 !! wikitext
-<math><img src="some evil external 
link"><script>some_evil_javascript();</script></math>
+<mw:toc><script>alert();</script></mw:toc>
 !! html+tidy
-<p>&lt;math&gt;&lt;img src="some evil external 
link"&gt;&lt;script&gt;some_evil_javascript();&lt;/script&gt;&lt;/math&gt;</p>
+<p>&lt;mw:toc&gt;&lt;script&gt;alert();&lt;/script&gt;&lt;/mw:toc&gt;</p>
 !! end
 
 ###
@@ -20889,6 +20908,26 @@
 !! end
 
 !! test
+Edit comment with link with more than one pipe (T99346)
+!! options
+comment
+!! wikitext
+[[Main Page|Many|pipes]]
+!! html/php
+<a href="/wiki/Main_Page" title="Main Page">Many|pipes</a>
+!! end
+
+!! test
+Complex edit comment with link with more than one pipe (T99346)
+!! options
+comment
+!! wikitext
+Created page with "<noinclude>[[Category:Requests for 
permissions/Bot|{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}]]</noinclude> === 
[[User:MineoBot|]] 8=== {{Request for permissions/links|Mineo..."
+!! html/php
+Created page with &quot;&lt;noinclude&gt;<a 
href="/index.php?title=Category:Requests_for_permissions/Bot&amp;action=edit&amp;redlink=1"
 class="new" title="Category:Requests for permissions/Bot (page does not 
exist)">{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}</a>&lt;/noinclude&gt; === 
<a href="/index.php?title=User:MineoBot&amp;action=edit&amp;redlink=1" 
class="new" title="User:MineoBot (page does not exist)">User:MineoBot</a> 8=== 
{{Request for permissions/links|Mineo...&quot;
+!! end
+
+!! test
 Space normalisation on autocomment (bug 22784)
 !! options
 comment
@@ -21614,6 +21653,22 @@
 
 !! end
 
+!! test
+T35715: s/strike element in ToC
+!! wikitext
+__TOC__
+== <s>test</s> test <strike>test</strike> ==
+!! html
+<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
+<ul>
+<li class="toclevel-1 tocsection-1"><a href="#test_test_test"><span 
class="tocnumber">1</span> <span class="toctext"><s>test</s> test 
<strike>test</strike></span></a></li>
+</ul>
+</div>
+
+<h2><span class="mw-headline" id="test_test_test"><s>test</s> test 
<strike>test</strike></span><span class="mw-editsection"><span 
class="mw-editsection-bracket">[</span><a 
href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit 
section: test test test">edit</a><span 
class="mw-editsection-bracket">]</span></span></h2>
+
+!! end
+
 # Note that the html output does not have the <p></p>, but the
 # html+tidy output *does*.  This is because the empty <p></p> is
 # removed by the sanitizer, but only when tidy is *not* enabled (!).
diff --git a/tools/fetch-parserTests.txt.js b/tools/fetch-parserTests.txt.js
index 2799e2c..c83e93f 100755
--- a/tools/fetch-parserTests.txt.js
+++ b/tools/fetch-parserTests.txt.js
@@ -12,9 +12,9 @@
 //     and update these hashes automatically.
 //
 // You can use 'sha1sum -b tests/parser/parserTests.txt' to compute this value:
-var expectedSHA1 = "983e154725fcf8f147588c9b7df2ab317a27061d";
+var expectedSHA1 = "77a7c7f8432fc30c3f2979e9d7a46a0c8aae2b5d";
 // git log --pretty=oneline -1 tests/parser/parserTests.txt
-var latestCommit = "d9c9199cca70f7deaf62111e7b6bd23f5b34634f";
+var latestCommit = "c2d29bf3738182f147b01ef2b526ed79fbbe6d7b";
 
 var fs = require('fs');
 var path = require('path');

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I032084de3cc47a22b914e5350ebbe79e9c1b9c1a
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

Reply via email to