jenkins-bot has submitted this change and it was merged. Change subject: Sync up with Parsoid parserTests. ......................................................................
Sync up with Parsoid parserTests. This now aligns with Parsoid commit b04ce02432166128a295c0f00ac1d64c6a469a81 Change-Id: I9f27dc299b87aa265039c0e25084489810c0f7c8 --- M tests/parser/parserTests.txt 1 file changed, 74 insertions(+), 1 deletion(-) Approvals: Cscott: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index 61c331d..078fa6c 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -8788,6 +8788,40 @@ !! end !! test +1. Nested mixed wikitext and html list +!! wikitext +* hi +* <ul><li>ho</li></ul> +* hi +** ho +!! html/php +<ul><li> hi</li> +<li> <ul><li>ho</li></ul></li> +<li> hi +<ul><li> ho</li></ul></li></ul> + +!! html/parsoid +<ul><li> hi</li> +<li> <ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>ho</li></ul></li> +<li> hi +<ul><li> ho</li></ul></li></ul> +!! end + +!! test +2. Nested mixed wikitext and html list (incompatible) +!! wikitext +; hi +: {{echo|<li>ho</li>}} +!! html/php +<dl><dt> hi</dt> +<dd> <li>ho</li></dd></dl> + +!! html/parsoid +<dl><dt> hi</dt> +<dd> <li about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","pi":[[{"k":"1","spc":["","","",""]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<li>ho</li>"}},"i":0}}]}'>ho</li></dd></dl> +!! end + +!! test Nested lists 1 !! wikitext *foo @@ -10655,6 +10689,43 @@ !! html/parsoid <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''"},"params":{},"i":0}}]}'>bar</span> baz </p> +!! end + +## This test is about making sure Parsoid's data-mw is well formed in the +## face of multiple templates with intersecting and overlapping ranges. The +## wikitext itself is wretched. +!! test +Templates with intersecting and overlapping ranges +!! wikitext +{|{{echo| +<p>ha</p>}} +{|{{echo| +<p>ho</p>}} +{{echo|{{!}}hi}} +|} +!! html/php+tidy +<p>ha</p> +<p>ho</p> +<table> +<tr> +<td></td> +</tr> +<tr> +<td>hi</td> +</tr> +</table> +<table> +<tr> +<td></td> +</tr> +</table> +!! html/parsoid +<p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","autoInsertedEnd":true,"pi":[[{"k":"1","spc":["","","",""]}],[{"k":"1","spc":["","","",""]}],[{"k":"1","spc":["","","",""]}]],"firstWikitextNode":"table"}' data-mw='{"parts":["{|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"\n<p>ha</p>"}},"i":0}},"\n","{|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"\n<p>ho</p>"}},"i":1}},"\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{!}}hi"}},"i":2}},"\n|}"]}'>ha</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'> + +</table><p about="#mwt1">ho</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'> + +<tbody><tr><td>hi</td></tr> +</tbody></table> !! end !! article @@ -20689,9 +20760,11 @@ Strip reserved data attributes !! wikitext <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div> -!! html +!! html/php <div data-ok="fred">d</div> +!! html/parsoid +<div data-x-data-mw="foo" data-x-data-parsoid="bar" data-x-data-mw-someext="baz" data-ok="fred" data-parsoid='{"stx":"html","a":{"data-ooui":null,"data-bad:ns":null},"sa":{"data-ooui":"xyzzy","data-bad:ns":"ns"}}'>d</div> !! end !! test -- To view, visit https://gerrit.wikimedia.org/r/266309 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9f27dc299b87aa265039c0e25084489810c0f7c8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Arlolra <abrea...@wikimedia.org> Gerrit-Reviewer: Cscott <canan...@wikimedia.org> Gerrit-Reviewer: Jackmcbarn <jackmcb...@gmail.com> 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