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

Change subject: Fix serializing LI hack on templates
......................................................................


Fix serializing LI hack on templates

 * Push it to the template parts instead of setting it on dp.

 * Changes getListBullets in the serializer to emit bullets for li
   instead of ul/ol. The ListHandler associates src with them, making it
   more consistent this way.

 * Fixes roundtripping the two test cases from the bug,

     * {{echo|<li>foo</li>}}

     * {{bibliografia|foo|bar}}

 * We already have a test for this, "Test the li-hack", which fails
   because the parsoid output differs from php in that it preserves the
   comment and, for an investigated reason, a few autoInsertedEnds are
   missing.

Bugs: T89627, T59910
Change-Id: I99f6c142d9a943513f17549da24a801815f52913
---
M lib/dom.t.handleLIHack.js
M lib/wts.TagHandlers.js
M tests/parserTests-blacklist.js
3 files changed, 31 insertions(+), 20 deletions(-)

Approvals:
  Subramanya Sastry: Looks good to me, approved
  Marcoil: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/lib/dom.t.handleLIHack.js b/lib/dom.t.handleLIHack.js
index 3de931b..74e4ac3 100644
--- a/lib/dom.t.handleLIHack.js
+++ b/lib/dom.t.handleLIHack.js
@@ -26,11 +26,18 @@
            !DU.isLiteralHTMLNode(prevNode) &&
            DU.nodeEssentiallyEmpty(prevNode)) {
 
-               var dp = DU.getDataParsoid( node );
+               var dp = DU.getDataParsoid( node ),
+                       typeOf = node.getAttribute( 'typeof' ) || '',
+                       liHackSrc = DU.getWTSource(env, prevNode);
 
-               // We have to store the extra information in order to
-               // reconstruct the original source for roundtripping.
-               dp.liHackSrc = DU.getWTSource(env, prevNode);
+               if ( /(?:^|\s)mw:Transclusion(?=$|\s)/.test( typeOf ) ) {
+                       var dataMW = DU.getDataMw( node );
+                       dataMW.parts.unshift( liHackSrc );
+               } else {
+                       // We have to store the extra information in order to
+                       // reconstruct the original source for roundtripping.
+                       dp.liHackSrc = liHackSrc;
+               }
 
                // Update the dsr. Since we are coalescing the first
                // node with the second (or, more precisely, deleting
diff --git a/lib/wts.TagHandlers.js b/lib/wts.TagHandlers.js
index 9357adb..aa5c15b 100644
--- a/lib/wts.TagHandlers.js
+++ b/lib/wts.TagHandlers.js
@@ -144,14 +144,18 @@
  * List helper: DOM-based list bullet construction
  */
 function getListBullets(node) {
-       var listTypes = {
+       var parentTypes = {
                ul: '*',
-               ol: '#',
+               ol: '#'
+       };
+       var listTypes = {
+               ul: '',
+               ol: '',
                dl: '',
                li: '',
                dt: ';',
                dd: ':'
-       }, res = '';
+       };
 
        // For new elements, for prettier wikitext serialization,
        // emit a space after the last bullet (if required)
@@ -163,12 +167,18 @@
                }
        }
 
+       var dp, nodeName, parentName, res = '';
        while (node) {
-               var nodeName = node.nodeName.toLowerCase(),
-                       dp = DU.getDataParsoid( node );
+               nodeName = node.nodeName.toLowerCase();
+               dp = DU.getDataParsoid( node );
 
                if (dp.stx !== 'html' && nodeName in listTypes) {
-                       res = listTypes[nodeName] + res;
+                       if ( nodeName === 'li' ) {
+                               parentName = 
node.parentNode.nodeName.toLowerCase();
+                               res = (parentTypes[parentName] || "") + res;
+                       } else {
+                               res = listTypes[nodeName] + res;
+                       }
                } else if (dp.stx !== 'html' || !dp.autoInsertedStart || 
!dp.autoInsertedEnd) {
                        break;
                }
diff --git a/tests/parserTests-blacklist.js b/tests/parserTests-blacklist.js
index b3b271d..1222e1a 100644
--- a/tests/parserTests-blacklist.js
+++ b/tests/parserTests-blacklist.js
@@ -58,7 +58,7 @@
 add("wt2html", "<nowiki> inside a link", "<p 
data-parsoid='{\"dsr\":[0,96,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Main_Page\" 
title=\"Main Page\" 
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Main_Page\"},\"sa\":{\"href\":\"Main&lt;nowiki>
 Page&lt;/nowiki>\"},\"dsr\":[0,30,2,2]}'>Main Page</a> <a rel=\"mw:WikiLink\" 
href=\"./Main_Page\" title=\"Main Page\" 
data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Main_Page\"},\"sa\":{\"href\":\"Main
 Page\"},\"dsr\":[31,96,12,2]}'>the main page <span typeof=\"mw:Nowiki\" 
data-parsoid='{\"dsr\":[57,94,8,9]}'>[it's not very good]</span></a></p>");
 add("wt2html", "2. Lists with start-of-line-transparent tokens before bullets: 
Template close", "<ul about=\"#mwt1\" typeof=\"mw:Transclusion\" 
data-parsoid='{\"dsr\":[0,18,0,0],\"pi\":[[{\"k\":\"1\",\"spc\":[\"\",\"\",\"\",\"\"]}]]}'
 data-mw='{\"parts\":[\"*foo 
\",{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"bar\\n\"}},\"i\":0}}]}'><li>foo
 bar</li></ul><span about=\"#mwt1\">\n</span><p 
data-parsoid='{\"dsr\":[18,22,0,0]}'>*baz</p>");
 add("wt2html", "Multiple list tags generated by templates", "<li 
about=\"#mwt1\" typeof=\"mw:Transclusion\" 
data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[0,44,null,null],\"pi\":[[{\"k\":\"1\",\"spc\":[\"\",\"\",\"\",\"\"]}],[{\"k\":\"1\",\"spc\":[\"\",\"\",\"\",\"\"]}],[{\"k\":\"1\",\"spc\":[\"\",\"\",\"\",\"\"]}]]}'
 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"&lt;li>\"}},\"i\":0}},\"a\\n\",{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"&lt;li>\"}},\"i\":1}},\"b\\n\",{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"&lt;li>\"}},\"i\":2}},\"c\"]}'>a\n</li><li
 about=\"#mwt1\" 
data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true}'>b\n</li><li 
about=\"#mwt1\" 
data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[null,44,null,0]}'>c</li>");
-add("wt2html", "Test the li-hack\n(The PHP parser relies on Tidy for the 
hack)", "<ul data-parsoid='{\"dsr\":[0,114,0,0]}'><li 
data-parsoid='{\"dsr\":[0,5,1,0]}'> foo</li>\n<li 
data-parsoid='{\"stx\":\"html\",\"dsr\":[6,19,6,null],\"liHackSrc\":\"* 
\"}'>li-hack</li>\n<li about=\"#mwt1\" typeof=\"mw:Transclusion\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[20,52,2,null],\"pi\":[[{\"k\":\"1\",\"spc\":[\"\",\"\",\"\",\"\"]}]],\"liHackSrc\":\"*
 \"}' 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"&lt;li>templated
 li-hack\"}},\"i\":0}}]}'>templated li-hack</li>\n<li 
data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[53,66,1,0]}'> <!--foo--> 
</li><li data-parsoid='{\"stx\":\"html\",\"dsr\":[66,114,4,null]}'> unsupported 
li-hack with preceding comments</li></ul>\n\n<ul 
data-parsoid='{\"stx\":\"html\",\"dsr\":[116,154,4,5]}'>\n<li 
data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[121,125,4,0]}'></li><li
 data-parsoid='{\"stx\":\"html\",\"dsr\":[125,148,4,5]}'>not a 
li-hack\n</li>\n</ul>");
+add("wt2html", "Test the li-hack\n(The PHP parser relies on Tidy for the 
hack)", "<ul data-parsoid='{\"dsr\":[0,114,0,0]}'><li 
data-parsoid='{\"dsr\":[0,5,1,0]}'> foo</li>\n<li 
data-parsoid='{\"stx\":\"html\",\"dsr\":[6,19,6,null],\"liHackSrc\":\"* 
\"}'>li-hack</li>\n<li about=\"#mwt1\" typeof=\"mw:Transclusion\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[20,52,2,null],\"pi\":[[{\"k\":\"1\",\"spc\":[\"\",\"\",\"\",\"\"]}]]}'
 data-mw='{\"parts\":[\"* 
\",{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"&lt;li>templated
 li-hack\"}},\"i\":0}}]}'>templated li-hack</li>\n<li 
data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[53,66,1,0]}'> <!--foo--> 
</li><li data-parsoid='{\"stx\":\"html\",\"dsr\":[66,114,4,null]}'> unsupported 
li-hack with preceding comments</li></ul>\n\n<ul 
data-parsoid='{\"stx\":\"html\",\"dsr\":[116,154,4,5]}'>\n<li 
data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[121,125,4,0]}'></li><li
 data-parsoid='{\"stx\":\"html\",\"dsr\":[125,148,4,5]}'>not a 
li-hack\n</li>\n</ul>");
 add("wt2html", "Unbalanced closing non-block tags don't break a list\n(php 
parser relies on Tidy to fix up)", "<p data-parsoid='{\"dsr\":[0,6,0,0]}'><span 
data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[0,6,6,0]}'></span></p>\n<ul
 data-parsoid='{\"dsr\":[7,32,0,0]}'><li 
data-parsoid='{\"dsr\":[7,22,1,0]}'>a<span 
data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[16,22,6,0]}'></span></li>\n<li
 data-parsoid='{\"dsr\":[23,32,1,0]}'>b</li></ul>");
 add("wt2html", "Magic Word: {{CURRENTMONTH1}}", "<p 
data-parsoid='{\"dsr\":[0,17,0,0]}'><span typeof=\"mw:Transclusion 
mw:Placeholder\" about=\"#mwt1\" id=\"mwt1\" 
data-parsoid='{\"dsr\":[0,17,null,null],\"pi\":[[]]}' 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"CURRENTMONTH1\",\"href\":\"./Template:CURRENTMONTH1\"},\"params\":{},\"i\":0}}]}'>Warning:
 Page/template fetching disabled, and no cache for 
Template:CURRENTMONTH1</span></p>");
 add("wt2html", "Magic Words LOCAL (UTC)", "<ul 
data-parsoid='{\"dsr\":[0,252,0,0]}'><li data-parsoid='{\"dsr\":[0,16,1,0]}'> 
<span about=\"#mwt1\" typeof=\"mw:Transclusion\" 
data-parsoid='{\"pi\":[[]],\"dsr\":[2,16,null,null]}' 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"LOCALMONTH\",\"function\":\"localmonth\"},\"params\":{},\"i\":0}}]}'>01</span></li>\n<li
 data-parsoid='{\"dsr\":[17,34,1,0]}'> <span typeof=\"mw:Transclusion 
mw:Placeholder\" about=\"#mwt2\" id=\"mwt2\" 
data-parsoid='{\"dsr\":[19,34,null,null],\"pi\":[[]]}' 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"LOCALMONTH1\",\"href\":\"./Template:LOCALMONTH1\"},\"params\":{},\"i\":0}}]}'>Warning:
 Page/template fetching disabled, and no cache for 
Template:LOCALMONTH1</span></li>\n<li data-parsoid='{\"dsr\":[35,55,1,0]}'> 
<span about=\"#mwt3\" typeof=\"mw:Transclusion\" 
data-parsoid='{\"pi\":[[]],\"dsr\":[37,55,null,null]}' 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"LOCALMONTHNAME\",\"function\":\"localmonthname\"},\"params\":{},\"i\":0}}]}'>January</span></li>\n<li
 data-parsoid='{\"dsr\":[56,79,1,0]}'> <span about=\"#mwt4\" 
typeof=\"mw:Transclusion\" 
data-parsoid='{\"pi\":[[]],\"dsr\":[58,79,null,null]}' 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"LOCALMONTHNAMEGEN\",\"function\":\"localmonthnamegen\"},\"params\":{},\"i\":0}}]}'>January</span></li>\n<li
 data-parsoid='{\"dsr\":[80,102,1,0]}'> <span about=\"#mwt5\" 
typeof=\"mw:Transclusion\" 
data-parsoid='{\"pi\":[[]],\"dsr\":[82,102,null,null]}' 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"LOCALMONTHABBREV\",\"function\":\"localmonthabbrev\"},\"params\":{},\"i\":0}}]}'>Jan</span></li>\n<li
 data-parsoid='{\"dsr\":[103,117,1,0]}'> <span about=\"#mwt6\" 
typeof=\"mw:Transclusion\" 
data-parsoid='{\"pi\":[[]],\"dsr\":[105,117,null,null]}' 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"LOCALDAY\",\"function\":\"localday\"},\"params\":{},\"i\":0}}]}'>1</span></li>\n<li
 data-parsoid='{\"dsr\":[118,133,1,0]}'> <span about=\"#mwt7\" 
typeof=\"mw:Transclusion\" 
data-parsoid='{\"pi\":[[]],\"dsr\":[120,133,null,null]}' 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"LOCALDAY2\",\"function\":\"localday2\"},\"params\":{},\"i\":0}}]}'>01</span></li>\n<li
 data-parsoid='{\"dsr\":[134,152,1,0]}'> <span about=\"#mwt8\" 
typeof=\"mw:Transclusion\" 
data-parsoid='{\"pi\":[[]],\"dsr\":[136,152,null,null]}' 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"LOCALDAYNAME\",\"function\":\"localdayname\"},\"params\":{},\"i\":0}}]}'>Thursday</span></li>\n<li
 data-parsoid='{\"dsr\":[153,168,1,0]}'> <span about=\"#mwt9\" 
typeof=\"mw:Transclusion\" 
data-parsoid='{\"pi\":[[]],\"dsr\":[155,168,null,null]}' 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"LOCALYEAR\",\"function\":\"localyear\"},\"params\":{},\"i\":0}}]}'>1970</span></li>\n<li
 data-parsoid='{\"dsr\":[169,184,1,0]}'> <span about=\"#mwt10\" 
typeof=\"mw:Transclusion\" 
data-parsoid='{\"pi\":[[]],\"dsr\":[171,184,null,null]}' 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"LOCALTIME\",\"function\":\"localtime\"},\"params\":{},\"i\":0}}]}'>00:02</span></li>\n<li
 data-parsoid='{\"dsr\":[185,200,1,0]}'> <span about=\"#mwt11\" 
typeof=\"mw:Transclusion\" 
data-parsoid='{\"pi\":[[]],\"dsr\":[187,200,null,null]}' 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"LOCALHOUR\",\"function\":\"localhour\"},\"params\":{},\"i\":0}}]}'>00</span></li>\n<li
 data-parsoid='{\"dsr\":[201,216,1,0]}'> <span about=\"#mwt12\" 
typeof=\"mw:Transclusion\" 
data-parsoid='{\"pi\":[[]],\"dsr\":[203,216,null,null]}' 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"LOCALWEEK\",\"function\":\"localweek\"},\"params\":{},\"i\":0}}]}'>1</span></li>\n<li
 data-parsoid='{\"dsr\":[217,231,1,0]}'> <span about=\"#mwt13\" 
typeof=\"mw:Transclusion\" 
data-parsoid='{\"pi\":[[]],\"dsr\":[219,231,null,null]}' 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"LOCALDOW\",\"function\":\"localdow\"},\"params\":{},\"i\":0}}]}'>4</span></li>\n<li
 data-parsoid='{\"dsr\":[232,252,1,0]}'> <span about=\"#mwt14\" 
typeof=\"mw:Transclusion\" 
data-parsoid='{\"pi\":[[]],\"dsr\":[234,252,null,null]}' 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"LOCALTIMESTAMP\",\"function\":\"localtimestamp\"},\"params\":{},\"i\":0}}]}'>19700101000203</span></li></ul>");
@@ -444,7 +444,7 @@
 add("wt2wt", "Horizontal ruler (should it add that extra space?)", 
"<hr>\n<hr>\nfoo <hr> bar\n");
 add("wt2wt", "Nested lists 3 (first element empty)", "\n**bar\n");
 add("wt2wt", "Nested lists 6 (both elements empty)", "\n**\n");
-add("wt2wt", "Test the li-hack\n(The PHP parser relies on Tidy for the hack)", 
"* foo\n* <li>li-hack</li>\n{{echo|<li>templated li-hack}}\n* <!--foo--> <li> 
unsupported li-hack with preceding comments</li>\n\n<ul>\n<li><li>not a 
li-hack\n</li>\n</ul>");
+add("wt2wt", "Test the li-hack\n(The PHP parser relies on Tidy for the hack)", 
"* foo\n* <li>li-hack</li>\n* {{echo|<li>templated li-hack}}\n* <!--foo--> <li> 
unsupported li-hack with preceding comments</li>\n\n<ul>\n<li><li>not a 
li-hack\n</li>\n</ul>");
 add("wt2wt", "Unbalanced closing non-block tags don't break a list\n(php 
parser relies on Tidy to fix up)", "<span>\n*a<span>\n*b");
 add("wt2wt", "Magic links: RFC (w/ non-newline whitespace, bug 28950/29025)", 
"RFC &nbsp;&#160;&#0160;&#xA0;&#Xa0; 822\nRFC 822\n");
 add("wt2wt", "Magic links: ISBN (w/ non-newline whitespace, bug 28950/29025)", 
"ISBN &nbsp;&#160;&#0160;&#xA0;&#Xa0; 
978&nbsp;0&#160;316&#0160;09811&#xA0;3\nISBN 9780316098113\nISBN 
978\n0316098113\n");
@@ -1905,7 +1905,7 @@
 add("selser", "Definition Lists: Mixed Lists: Test 8 [[[1,2,1]]]", "* 
d18p71r17qkqehfr\n::* d2");
 add("selser", "Definition Lists: Mixed Lists: Test 8 [[[1,4,[2]]]]", "* 
d1p00sd2ve34ohia4i\n:: waos5kb13d8qto6r\n::* d2");
 add("selser", "Definition Lists: Mixed Lists: Test 8 [[[1,2,[[[[4]]]]]]]", "* 
d1zrb7mejr5l45z5mi\n::*ll71mwfvepn6zuxr");
-add("selser", "Definition Lists: Mixed Lists: Test 8 [[[[3],2,[1]]]]", 
":*2j7qe095hdm42t9\n* d2");
+add("selser", "Definition Lists: Mixed Lists: Test 8 [[[[3],2,[1]]]]", 
":2j7qe095hdm42t9\n* d2");
 add("selser", "Definition Lists: Mixed Lists: Test 8 [[[0,3,[2]]]]", "* d1\n:: 
1lcvy03rlwmf5hfr\n::* d2");
 add("selser", "Definition Lists: Mixed Lists: Test 8 [[[1,0,3]]]", "* d1\n");
 add("selser", "Definition Lists: Mixed Lists: Test 9 [[1]]", ";foo :bar");
@@ -2179,20 +2179,14 @@
 add("selser", "Nested lists 7 (skip initial nesting levels) [[[2]]]", 
"*tg28w4nd7g0kke29\n** foo");
 add("selser", "Nested lists 7 (skip initial nesting levels) [[[[[1]]]]]", "* 
foo");
 add("selser", "List interrupted by empty line or heading [[1],0,[1],2,3,0,0]", 
"* foo\n\n* bar\nxmkdz1mzo88e61or\n\n* Another list item");
-add("selser", "Test the li-hack\n(The PHP parser relies on Tidy for the hack) 
[[1,0,3,0,0,0,3,3],0,[2,1,2,0]]", "* foo\n\n* {{echo|<li>templated 
li-hack}}\n\n<ul><li>b1mow0yq0r6vquxr</li>\n<li 
data-foobar=\"t8no3rbr3z9tfbt9\"><li>3yjm1pbgbwbchaor</li><li>not a 
li-hack\n</li>\n</ul>");
 add("selser", "Test the li-hack\n(The PHP parser relies on Tidy for the hack) 
[[2,2,[4],4,0,4,[4,2,0],2],4,2]", "* gd98m9cyrr3blnmi\n* foo\n* 
9sdwdwxg808uxr\n* <li>qbp76uxnngpeqaor</li>* hq26140t3o50cnmi* 
{{echo|<li>templated li-hack}}* 
m7l70yv2k68byb9\n*0974cuf1fg808uxrhdzd51gs5jwqm2t9<!--foo--> \n* 
gwwpwp29uh8jv2t9<li> unsupported li-hack with preceding 
comments\niii1h3getutyb9\n\ntbukhy9uz62vgqfr<ul>\n<li><li>not a 
li-hack\n</li>\n</ul>");
-add("selser", "Test the li-hack\n(The PHP parser relies on Tidy for the hack) 
[[0,0,1,0,0,0,[2,0,0],[2]],0,1]", "* foo\n* <li 
data-foobar=\"cdxw3x6pvjyh9f6r\">li-hack</li>\n* {{echo|<li>templated 
li-hack}}\n*5bcaf8cgmskvgqfr <!--foo--> <li>epoqdn0m4t5ipb9 unsupported li-hack 
with preceding comments</li>\n\n<ul 
data-foobar=\"cwbnoi03jqsbrzfr\">\n<li><li>not a li-hack\n</li>\n</ul>");
-add("selser", "Test the li-hack\n(The PHP parser relies on Tidy for the hack) 
[[[4],0,4,0,0,0,[2,2,3],1],0,3]", "*eyhnibrdhnpwg66r\n* 9o3fshoa22fn7b9\n* 
{{echo|<li>templated li-hack}}\n*2vgj45s11a4w8kt9 te892w8kyutsm7vi<!--foo--><li 
data-foobar=\"ypksakx5wirg4x6r\"> unsupported li-hack with preceding 
comments</li>\n");
 add("selser", "Test the li-hack\n(The PHP parser relies on Tidy for the hack) 
[[[4],0,[3],4,0,0,[3,0,0],0],4,[0,1,0,2]]", "*5axx6zgskq4ims4i\n* <li></li>* 
4ban7p2mwlxcrf6r* {{echo|<li>templated li-hack}}\n*<!--foo--> <li> unsupported 
li-hack with preceding comments\n261puergg1n0cnmi<ul>\n<li 
data-foobar=\"dacb5wtes3ndygb9\"><li>not a 
li-hack\n</li><li>nt3r99z0dkq8semi</li>\n</ul>");
 add("selser", "Test the li-hack\n(The PHP parser relies on Tidy for the hack) 
[2,3,4]", "tya6uw5ys8ctmx6r\n* foo\n* <li>li-hack\n* {{echo|<li>templated 
li-hack}}\n* <!--foo--> <li> unsupported li-hack with preceding 
comments\nfpi1wwvfk98jjor\n");
 add("selser", "Test the li-hack\n(The PHP parser relies on Tidy for the hack) 
[[[2],0,[2],2,0,2,[0,0,4],2],0,[3,0,4,3]]", "*2bxu6mn3tv3x47vi foo\n* 
<li>93ijc5cyeg5h4cxrli-hack</li>* hcha5b8xr3wyiudi\n* {{echo|<li>templated 
li-hack}}* afxnfvmf5nuerk9\n* <!--foo-->jpnddx4v0u8ilik9\n* 7jxfx13m53tyb9<li> 
unsupported li-hack with preceding 
comments\n\n<ul><li><li>8h1c1cpueuerk9</li></ul>");
 add("selser", "Test the li-hack\n(The PHP parser relies on Tidy for the hack) 
[[[3],2,2,0,0,3,4,[3]],0,[2,0,3,0]]", "*\n* 8o59b9o1ocl0izfr\n* 
jb35d111zrjatt9* <li>li-hack\n* {{echo|<li>templated li-hack}}* 
fnt4sb5am6mndn29<li></li>\n\n<ul><li>h40y8bq2prchxgvi</li>\n<li>\n</ul>");
-add("selser", "Test the li-hack\n(The PHP parser relies on Tidy for the hack) 
[[[2],0,4,4,0,0,4,4],3,4]", "*gg3bkbyiiw8f47vi foo\n* y5psfxmpoxn7b9\n* 
7eg616kvxv4sfw29* {{echo|<li>templated li-hack}}\n* xjvkz4y7evzpvi\n* 
mig7jxbkxgmygb9\n9cgz4mzhdye6d2t9\n");
-add("selser", "Test the li-hack\n(The PHP parser relies on Tidy for the hack) 
[[4,0,1,2,0,0,[4,2,0],[3]],2,0]", "* ebs3k6p9u9xusor\n* <li 
data-foobar=\"c02i637r172jra4i\">li-hack</li>* j1gu6liwspjh5mi\n* 
{{echo|<li>templated li-hack}}\n*zafumgyse093haorady79u1k0jh8h0k9<!--foo--> 
<li></li>\ndxwlaudn4lw8w7b9\n\n<ul>\n<li><li>not a li-hack\n</li>\n</ul>");
 add("selser", "Test the li-hack\n(The PHP parser relies on Tidy for the hack) 
[[2,0,4,0,0,3,2,3],3,2]", "* a2sete5kqgmbo6r\n* foo\n* llnzbl3rhrnklnmi\n* 
{{echo|<li>templated li-hack}}* jhdcjklsub84obt9\n* <!--foo--> 
\ne5gkponwwotakyb9<ul>\n<li><li>not a li-hack\n</li>\n</ul>");
 add("selser", "Test the li-hack\n(The PHP parser relies on Tidy for the hack) 
[1,3,1]", "* foo\n* <li>li-hack\n* {{echo|<li>templated li-hack}}\n* <!--foo--> 
<li> unsupported li-hack with preceding comments<ul 
data-foobar=\"89i373y5q74lsor\">\n<li><li>not a li-hack\n</li>\n</ul>");
 add("selser", "Test the li-hack\n(The PHP parser relies on Tidy for the hack) 
[[1,4,0,0,0,0,[0,0,3],4],2,2]", "* foo\n* n797ae7cl1y8pvi* <li>li-hack\n* 
{{echo|<li>templated li-hack}}\n* <!--foo-->\n* 
kd4plq2320wtrzfr\n428wbu0j7uhoxbt9\n\nwmhov9tugfd2t9<ul>\n<li><li>not a 
li-hack\n</li>\n</ul>");
-add("selser", "Test the li-hack\n(The PHP parser relies on Tidy for the hack) 
[[[2],0,1,4,0,0,4,1],2,3]", "*2t5t41fmhglm1jor foo\n* <li 
data-foobar=\"mgky12j3f5mf5hfr\">li-hack</li>* 9q8agmlfdt5ipb9* 
{{echo|<li>templated li-hack}}\n* 85jl8fhxtyfirudi<li 
data-foobar=\"jaxytijruwjkmx6r\"> unsupported li-hack with preceding 
comments</li>\nbjoohv9rzkwt57b9\n");
 add("selser", "Test the li-hack\n(The PHP parser relies on Tidy for the hack) 
[[1,0,0,4,0,0,[2,0,4],[4]],2,3]", "* foo\n* <li>li-hack* wy513yd4ljlzbyb9* 
{{echo|<li>templated li-hack}}\n*lvt3i30i074aemi 
<!--foo-->32nj85lx2r0jxlxr<li>g6v157t0tkufpqfr</li>\np9gpb5s6zx91kyb9\n");
 add("selser", "Test the li-hack\n(The PHP parser relies on Tidy for the hack) 
[1,0,1]", "* foo\n* <li>li-hack\n* {{echo|<li>templated li-hack}}\n* <!--foo--> 
<li> unsupported li-hack with preceding comments\n\n<ul 
data-foobar=\"444bel5zr0yvte29\">\n<li><li>not a li-hack\n</li>\n</ul>");
 add("selser", "Unbalanced closing non-block tags don't break a list\n(php 
parser relies on Tidy to fix up) [[4],0,[[4,4],3,2]]", 
"390h6pqo24y22o6r\n*o41tgyrxzloko6rkhwclpkbqgsqbyb9\n* 
x920d3kit2c323xr\n*b</span>");
@@ -2585,7 +2579,7 @@
 add("selser", "Bug 529: Uncovered bullet leaving empty list, normally removed 
by tidy [[[2],0]]", "*vkl4nqq6z9kvs4i\n****** Foo {{bullet}}");
 add("selser", "Bug 529: Uncovered bullet leaving empty list, normally removed 
by tidy [[[1],0]]", "****** Foo {{bullet}}");
 add("selser", "Bug 529: Uncovered bullet leaving empty list, normally removed 
by tidy [[[[1]],0]]", "***** Foo {{bullet}}");
-add("selser", "Bug 529: Uncovered bullet leaving empty list, normally removed 
by tidy [[[[[[3]]]],0]]", "***{{bullet}}");
+add("selser", "Bug 529: Uncovered bullet leaving empty list, normally removed 
by tidy [[[[[[3]]]],0]]", "**{{bullet}}");
 add("selser", "Bug 529: Uncovered bullet leaving empty list, normally removed 
by tidy [[[[2]],0]]", "** y0slrsmmchjxxbt9\n****** Foo {{bullet}}");
 add("selser", "Bug 529: Uncovered bullet leaving empty list, normally removed 
by tidy [[[[[[[4]]]]],0]]", "***u5i7s9pdlw8w7b9{{bullet}}");
 add("selser", "preload: check that it doesn't try to do tricks [[2]]", "* 
didei13ahu0afw29\n* <!-- Hello --> ''{{world}}'' 
{{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} 
#if:1|2|3}}");

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I99f6c142d9a943513f17549da24a801815f52913
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra <[email protected]>
Gerrit-Reviewer: Cscott <[email protected]>
Gerrit-Reviewer: Marcoil <[email protected]>
Gerrit-Reviewer: Subramanya Sastry <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to