Arlolra has uploaded a new change for review.
https://gerrit.wikimedia.org/r/226096
Change subject: Don't insert in fosterable position
......................................................................
Don't insert in fosterable position
* We already try to do this, but aren't getting it done quite right.
* Newly failing selser tests are all for tests where lots of other
selser tests fail. Seem to be cases where selser is more accurate
than wt2wt.
* The reason the wrapperName block is entered is because TR and CAPTION
are considered isBlockNodeWithVisibleWT.
Change-Id: I8578809a2caf90df67de138c9fdf1668d94aa8af
---
M tests/parserTests-blacklist.js
M tests/parserTests.js
2 files changed, 37 insertions(+), 13 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid
refs/changes/96/226096/1
diff --git a/tests/parserTests-blacklist.js b/tests/parserTests-blacklist.js
index 4d5d865..e694e56 100644
--- a/tests/parserTests-blacklist.js
+++ b/tests/parserTests-blacklist.js
@@ -1909,11 +1909,17 @@
add("selser", "Unclosed and unmatched quotes
[3,0,[2],0,[[2]],3,[3,0],0,4,4,0,0,3,2,0,3,[[4],2,4,0,3,0],2,3,3,[3,3,0]]",
"\nt6n1bkvx9wq7u8fr'''''Bold italic text ''with italic deactivated'' in
between.'''''\n\n'''mdiwcalkyki6bt9Bold
text..'''\n\n'''<nowiki/>'''\n\n1il337h4ozu84cxr\n\nowkwkmpgu45z5mi\n\n''Italic
tag left open\n\n0jlauri2d7gjsjor\n\n<!-- Unmatching number of opening, closing
tags: -->'''xapa2a5a6cdw8kt9'''lc002uv6d1dzpvis election fik23fdz9d89qkt9 beat
s.\n\n8ykwjs7kuwg0hpvi\n\ns plain");
add("selser", "Unclosed and unmatched quotes
[2,4,3,0,2,0,1,0,[3],0,[2],0,2,0,0,2,[2,2,4,0,1,0],2,4,3,4]",
"re6gnnkhd1tnjyvi\n\n'''''Bold italic text '''with bold deactivated''' in
between.'''''\n\nbdwnekfnkxei2j4i\n\nva244jbhttpdgqfr\n\n'''Bold
text..\n\n..spanning two paragraphs (should not
work).'''\n\nlrd6syi4ygugzaor''Italic tag left
open\n\nknfaulivfgca0pb9\n\nNormal text.\n\n<!-- Unmatching number of opening,
closing tags: -->h8w8s0eci66tuik9\n\nu9daa8hfmgm5z5mi'''This
year'<nowiki/>'''s4k3bfthkfq1tt9s election am5ar352e2ltbj4i beat '''last
year''''s.\n\nrgsn8f7qx23p7gb9\n\nlhg77py8ot21emi\n\n7h6jcsa4wmzsq0k9\n");
add("selser", "Unclosed and unmatched quotes
[[1],2,4,0,[4],0,[4,0],0,[[2]],3,2,0,2,0,0,2,[0,2,2,0,1,0],0,1,0,2]",
"'''''Bold italic text '''with bold deactivated''' in
between.'''''\n\n91y6zy5s4079zfr\n\nmkyoq2vkvt0jatt9\n\n8yeajt4jwaru23xr\n\nn2z6ghxy6lp7gb9'''<nowiki/>'''\n\n'''9c8lhwf3v6zgp66rBold
tag left open'''\n\nootbfqoaxawi2j4i\n\n''Italic tag left
open\n\nvv89fig83pst6gvi\n\nNormal text.\n\n<!-- Unmatching number of opening,
closing tags: -->73vckpnoy6s3v7vi\n\n'''This year'<nowiki/>'''eedgwt17jt9be29s
election gqta5jrflissjor''should'' beat '''last year''''s.\n\n''Tom'''s car is
bigger than '''''<nowiki/>'''Susan'''s.\n\nz1mgwtgr2xjhh0k9\n\nPlain
''italic'''s plain");
+add("selser", "A table with captions with non-default spaced attributes and a
table row [[3,2,3,[4],4,[2,4]]]", "{|<!--90q42mbx340a4i-->\n|+style=\"color:
red;\"|caption2\n|+ style=\"color: red;\"
|68x5dnp2q5xw29<!--msaci0wnxchgds4i--><!--fhl1z8tl9txu5wmi-->\n|-\n|
foo<!--z5tecc0c7ynwmi-->\n|}");
+add("selser", "A table with captions with non-default spaced attributes and a
table row [[0,2,4,0,3,[4,0]]]", "{|\n<!--8folgr0kquboi529-->|+style=\"color:
red;\"|caption2<!--9isvnh2z6j2it3xr-->\n|+ style=\"color: red;\"|
caption3<!--cegg9qdr9hjgu8fr-->\n|}");
add("selser", "A table with captions with non-default spaced attributes and a
table row [[2,0,2,3,3,3]]", "{|<!--69d5z7pa8iio1or-->\n|+style=\"color:
red;\"|caption2<!--1r97810ys18j8aor-->\n|}");
add("selser", "A table with captions with non-default spaced attributes and a
table row [2]", "ogl2d411a038r529\n{|\n|+style=\"color: red;\"|caption2\n|+
style=\"color: red;\"| caption3\n|-\n| foo\n|}");
add("selser", "A table with captions with non-default spaced attributes and a
table row [[4,[3],2,0,3,[[3,4],4]]]", "{|<!--glpyv8ws43elv7vi-->\n|+
style=\"color: red;\" |<!--977mpdg7bdg6i529-->\n|+ style=\"color: red;\"|
caption3\n|-\n|vnlowwkt14hadcxr<!--tw8w8jwmz4p1fw29-->\n|}");
+add("selser", "A table with captions with non-default spaced attributes and a
table row [[2,2,0,4,2,[0,4]]]",
"{|<!--hq2lymey7xxkcsor-->\n<!--q20r2b6ga9xry66r-->|+style=\"color:
red;\"|caption2\n<!--kyojp7sr96v18aor--><!--bky3qng4ga2a9k9-->\n|-\n|
foo<!--phpg9eaca86ez5mi-->\n|}");
add("selser", "A table with captions with non-default spaced attributes and a
table row [[0,[2],0,0,0,[[0,2],0]]]", "{|\n|+ style=\"color: red;\"
|rsk37teyuq22csorcaption2\n|+ style=\"color: red;\"|
caption3\n|-\n|vefem1fh6g1ll3di\n| foo\n|}");
+add("selser", "A table with captions with non-default spaced attributes and a
table row [[2,0,3,[2],0,[2,0]]]", "{|<!--8q7n7m2tbswwb3xr-->\n|+style=\"color:
red;\"|caption2\n|+ style=\"color: red;\" |lcnpzckjupgphkt9
caption3\n<!--px2ept6jeswnrk9-->|-\n| foo\n|}");
add("selser", "A table with captions with non-default spaced attributes and a
table row [1]", "{| data-foobar=\"o9k0fan234k7qfr\"\n|+style=\"color:
red;\"|caption2\n|+ style=\"color: red;\"| caption3\n|-\n| foo\n|}");
+add("selser", "A table with captions with non-default spaced attributes and a
table row [[0,[2],0,2,3,[[2,0],0]]]", "{|\n|+ style=\"color: red;\"
|w96hfg740cm78pvicaption2\n<!--s66fh5bg5g1wz5mi-->|+ style=\"color: red;\"|
caption3\n|-\n|i7akogjci8i4fgvi\n| foo\n|}");
+add("selser", "A table with captions with non-default spaced attributes and a
table row [[3,4,3,0,0,1]]", "{|<!--xb57b1mfbeh77gb9-->\n|+ style=\"color:
red;\"| caption3\n|-\n| foo\n|}");
add("selser", "A table with captions with non-default spaced attributes and a
table row [[0,0,0,1,4,3]]", "{|\n|+style=\"color: red;\"|caption2\n|+
style=\"color: red;\" data-foobar=\"4n9ju8e6u4ayk3xr\" |
caption3<!--8vitqxcwje89f6r-->\n|}");
add("selser", "A table with captions with non-default spaced attributes and a
table row [[0,0,2,[3],3,[[0,4],0]]]", "{|\n|+style=\"color:
red;\"|caption2<!--4865t93rr418aor-->\n|+ style=\"color: red;\"
|\n|-\n|n2z1139bdvuc8fr\n|}");
add("selser", "Table td-cell syntax variations [2]", "sbzhcg70xtq8semi\n{|\n|
foo bar foo | baz\n| foo bar foo || baz\n| style='color:red;' | baz\n|
style='color:red;' || baz\n|}");
@@ -1924,26 +1930,32 @@
add("selser", "Table td-cell syntax variations [[0,[1,4]]]", "{|\n| foo bar
foo | baz\n| foo bar foo || baz\n| style='color:red;' | baz\n|
style='color:red;' || baz<!--tthr988c8d9ara4i-->\n|}");
add("selser", "Table td-cell syntax variations [[0,[[1,4,0,2,2,0,4,0,0],3]]]",
"{|\n| data-foobar=\"yapr5vvoeskk2o6r\" foo bar | baz\n|n59kxzdkg0dg3nmi\n| foo
bar foo \n|3uyod7tniwfjemi|| baz\n|mksz2gze2hjjor\n| style='color:red;' |
baz\n|2n7mgtwagfzuxr\n| style='color:red;' || baz\n|}");
add("selser", "Table td-cell syntax variations [[0,2]]",
"{|\n<!--uiyg1xnqf84u0udi-->| foo bar foo | baz\n| foo bar foo || baz\n|
style='color:red;' | baz\n| style='color:red;' || baz\n|}");
+add("selser", "Allow +/- in 2nd and later cells in a row, in 1st cell when
td-attrs are present, or in 1st cell when there is a space between \"|\" and
+/- [[4,[[0,0,4,3],4,[2,4,[2],[3],2,[3],[2],1],3,4,0]]]",
"{|<!--ey69w1huzxhl4n29-->\n|-\n|style='color:red;'|+1\n|9tw49jdk0u5o2yb9<!--kx0w31z2r3eg66r-->\n|-\n|pql3wifv5zouhaor\n|b17pm8krfbqehfr||y5j51k4ijfzme7b9
2 ||\n|agfkr8szrrb5ipb9\n|||jzz1rvd4y3bit3xr+2 ||
data-foobar=\"hz9jkr87n7co9a4i\" |-3<!--uomsfojpwyi4quxr-->\n|}");
add("selser", "Allow +/- in 2nd and later cells in a row, in 1st cell when
td-attrs are present, or in 1st cell when there is a space between \"|\" and
+/- [1]", "{|
data-foobar=\"qni1jj96d8ia4i\"\n|-\n|style='color:red;'|+1\n|style='color:blue;'|-1\n|-\n|
1 || 2 || 3\n| 1 ||+2 ||-3\n|-\n| +1\n| -1\n|}");
add("selser", "Allow +/- in 2nd and later cells in a row, in 1st cell when
td-attrs are present, or in 1st cell when there is a space between \"|\" and
+/- [2]",
"pedhswzbj517zaor\n{|\n|-\n|style='color:red;'|+1\n|style='color:blue;'|-1\n|-\n|
1 || 2 || 3\n| 1 ||+2 ||-3\n|-\n| +1\n| -1\n|}");
add("selser", "Allow +/- in 2nd and later cells in a row, in 1st cell when
td-attrs are present, or in 1st cell when there is a space between \"|\" and
+/- [[0,1]]", "{|\n|-\n|style='color:red;'|+1\n|style='color:blue;'|-1\n|-\n|
1 || 2 || 3\n| 1 ||+2 ||-3\n|-\n| +1\n| -1\n|}");
add("selser", "Allow +/- in 2nd and later cells in a row, in 1st cell when
td-attrs are present, or in 1st cell when there is a space between \"|\" and
+/- [[0,2]]",
"{|\n<!--xllkdkan97eyu8fr-->|-\n|style='color:red;'|+1\n|style='color:blue;'|-1\n|-\n|
1 || 2 || 3\n| 1 ||+2 ||-3\n|-\n| +1\n| -1\n|}");
+add("selser", "Allow +/- in 2nd and later cells in a row, in 1st cell when
td-attrs are present, or in 1st cell when there is a space between \"|\" and
+/- [[3,[[3,1,0,[4]],3,4,2,[0,4,0,0],4]]]", "{|\n|-\n| style=\"color:red;\"
data-foobar=\"cppwm0tpam7vi\"
|+1\n|style='color:blue;'|a7cowbidjazia4i<!--x62n4p612rpgy14i--><!--d2uvh61vtoqolxr-->\n|-\n|8t7ghb7id0smunmi\n|
-1<!--qb5bhmh2xggjsjor-->\n|}");
add("selser", "Allow +/- in 2nd and later cells in a row, in 1st cell when
td-attrs are present, or in 1st cell when there is a space between \"|\" and
+/- [[0,[[3,2,0,0],0,[2,0,1,[2],0,0,0,2],0,[0,[4],0,0],0]]]",
"{|\n|-\n|0bez83pg3gom9529\n|style='color:red;'|+1\n|style='color:blue;'|-1\n|-\n|sxirzpn3nq257b9\n|
1 || data-foobar=\"27xcharybvs4i\" | 2 ||lz04cejtja714i 3\n| 1 ||+2
\n|h7c5rmx7i8b0529||-3\n|-\n|kfu05heouun89f6r\n| -1\n|}");
add("selser", "Table rowspan [[3,2]]", "{| border=1<!--dw212cp9esif6r-->\n|
Cell 1, row 1\n|rowspan=2| Cell 2, row 1 (and 2)\n| Cell 3, row 1\n|-\n| Cell
1, row 2\n| Cell 3, row 2\n|}");
add("selser", "Table rowspan [[0,1]]", "{| border=1\n| Cell 1, row
1\n|rowspan=2| Cell 2, row 1 (and 2)\n| Cell 3, row 1\n|-\n| Cell 1, row 2\n|
Cell 3, row 2\n|}");
add("selser", "Table rowspan [[2,[[2,0,3,0,4],0,[0,0,0,3],2]]]", "{|
border=1<!--hf5z89mzkeh77gb9-->\n|4j3mbmbko7gmn29\n| Cell 1, row
1\n\n|r763mckykwlba9k9\n|-\n| Cell 1, row 2\n<!--88adjxaw01ss8aor-->\n|}");
add("selser", "Table rowspan [2]", "xb37vwsdil6gk3xr\n{| border=1\n| Cell 1,
row 1\n|rowspan=2| Cell 2, row 1 (and 2)\n| Cell 3, row 1\n|-\n| Cell 1, row
2\n| Cell 3, row 2\n|}");
add("selser", "Table rowspan [1]", "{| border=\"1\"
data-foobar=\"xgpmrwgiugpbvs4i\"\n| Cell 1, row 1\n|rowspan=2| Cell 2, row 1
(and 2)\n| Cell 3, row 1\n|-\n| Cell 1, row 2\n| Cell 3, row 2\n|}");
+add("selser", "Table rowspan [[0,[1,0,2,0]]]", "{| border=1\n| Cell 1, row
1\n|rowspan=2| Cell 2, row 1 (and 2)\n| Cell 3, row
1\n<!--esqo19m7kv620529-->|-\n| Cell 1, row 2\n| Cell 3, row 2\n|}");
add("selser", "Table rowspan [[2,2]]", "{|
border=1<!--c9eo96nqfmjthuxr-->\n<!--mdmpc8uzbgoxn7b9-->| Cell 1, row
1\n|rowspan=2| Cell 2, row 1 (and 2)\n| Cell 3, row 1\n|-\n| Cell 1, row 2\n|
Cell 3, row 2\n|}");
+add("selser", "Table rowspan [[0,[1,0,2,2]]]", "{| border=1\n| Cell 1, row
1\n|rowspan=2| Cell 2, row 1 (and 2)\n| Cell 3, row
1\n<!--f24m9zom9d2kpgb9-->|-\n| Cell 1, row 2\n| Cell 3, row
2<!--houk9s548i3pu8fr-->\n|}");
add("selser", "Table rowspan [[3,[1,0,[0,2,0,4],2]]]", "{| border=1\n| Cell 1,
row 1\n| rowspan=\"2\" | Cell 2, row 1 (and 2)\n| Cell 3, row
1\n|-\n|gsp7c59fnpadobt9\n| Cell 1, row
2\n|bwzd1d95wa7wg66r<!--68bu9hd9zl37syvi-->\n|}");
add("selser", "Table rowspan [[0,[[4,0,4,0,1],0,1,2]]]", "{|
border=1\n|aspxhnaofiqf47vi\n|73fyijt65nuerk9\n|
data-foobar=\"t7trqii8bukp4x6r\" | Cell 3, row 1\n|-
data-foobar=\"1pkfpcn5xq6t7qfr\"\n| Cell 1, row 2\n| Cell 3, row
2<!--sebb2ix3zzzadcxr-->\n|}");
add("selser", "Table rowspan [[0,4]]", "{|
border=1\n<!--1gqzmb9oym34n29-->|}");
add("selser", "Table rowspan [[4,1]]", "{| border=1<!--df20a6ug11ao47vi-->\n|
Cell 1, row 1\n|rowspan=2| Cell 2, row 1 (and 2)\n| Cell 3, row 1\n|-\n| Cell
1, row 2\n| Cell 3, row 2\n|}");
+add("selser", "Table rowspan [[0,[2,0,4,0]]]", "{|
border=1\n<!--bz2zkuwgtbotj4i-->| Cell 1, row 1\n|rowspan=2| Cell 2, row 1 (and
2)\n| Cell 3, row 1\n<!--hynk9y1byaw6ogvi-->\n|}");
add("selser", "Table rowspan [[2,1]]", "{| border=1<!--kn5vfku6oyumobt9-->\n|
Cell 1, row 1\n| rowspan=\"2\" | Cell 2, row 1 (and 2)\n| Cell 3, row 1\n|-\n|
Cell 1, row 2\n| Cell 3, row 2\n|}");
add("selser", "Table rowspan [[3,[1,0,[0,1,0,2],4]]]", "{| border=1\n| Cell 1,
row 1\n| rowspan=\"2\" | Cell 2, row 1 (and 2)\n| Cell 3, row 1\n|-\n|
data-foobar=\"gzbtsmzgf46g8pvi\" | Cell 1, row 2\n|gdz7sc5bs1xg8pvi\n| Cell 3,
row 2<!--kjwr2bchfhqto6r-->\n|}");
add("selser", "Nested table [[0,[1,4]]]", "{| border=1\n| α\n|\n{|
bgcolor=#ABCDEF border=2\n|nested\n|-\n|table\n|}\n|the original table
again<!--t5nreiu3qsxuhaor-->\n|}");
add("selser", "Nested table [[0,2]]", "{| border=1\n<!--262ep7u743gqr529-->|
α\n|\n{| bgcolor=#ABCDEF border=2\n|nested\n|-\n|table\n|}\n|the original
table again\n|}");
add("selser", "Nested table [2]", "y38000xvz4vg3nmi\n{| border=1\n|
α\n|\n{| bgcolor=#ABCDEF border=2\n|nested\n|-\n|table\n|}\n|the original
table again\n|}");
+add("selser", "Nested table [[2,[4,2]]]", "{|
border=1<!--0dbf76hr5a9bpgb9-->\n<!--dkjh2vfrzy9cnmi--><!--dr69h58wuje5ewmi-->\n|}");
add("selser", "Nested table [[2,3]]", "{|
border=1<!--cn1vfhuotu5qxgvi-->\n|}");
add("selser", "Nested table [[4,1]]", "{| border=1<!--21kjc55zx2tbuik9-->\n|
α\n|\n{| bgcolor=#ABCDEF border=2\n|nested\n|-\n|table\n|}\n|the original
table again\n|}");
add("selser", "Nested table [1]", "{| border=\"1\"
data-foobar=\"z21mjbodw38lg14i\"\n| α\n|\n{| bgcolor=#ABCDEF
border=2\n|nested\n|-\n|table\n|}\n|the original table again\n|}");
@@ -1962,7 +1974,7 @@
add("selser", "Invalid attributes in table cell (bug 1830) [2]",
"ihzdqjdk01bp4x6r\n{|\n|Cell:|broken\n|}");
add("selser", "Invalid attributes in table cell (bug 1830) [[0,2]]",
"{|\n<!--0d7j9j0jsmj9k9-->|Cell:|broken\n|}");
add("selser", "Invalid attributes in table cell (bug 1830) [[0,1]]",
"{|\n|Cell:|broken\n|}");
-add("selser", "Invalid attributes in table cell (bug 1830) [[0,[2,0]]]",
"j29v67hfrufmvx6r\n{|\n|Cell:|broken\n|}");
+add("selser", "Invalid attributes in table cell (bug 1830) [[0,[2,0]]]",
"{|\n<!--j29v67hfrufmvx6r-->|Cell:|broken\n|}");
add("selser", "Invalid attributes in table cell (bug 1830) [[3,[[2],0]]]",
"{|\n|otq3btd8klf2yb9\n|Cell:|broken\n|}");
add("selser", "Invalid attributes in table cell (bug 1830) [[0,[1,3]]]",
"{|\n|Cell:|broken\n|}");
add("selser", "Table attributes with empty value [2]",
"ypqzbga8qxeqm2t9\n{|\n| style=| hello\n|}");
@@ -1974,6 +1986,7 @@
add("selser", "Build table with {{!}} [2]", "vlzvgbqpbh6qd7vi\n{{{!}}
class=\"wikitable\"\n! header\n! second header\n{{!}}-
style=\"color:red;\"\n{{!}} data {{!}}{{!}} style=\"color:red;\" {{!}} second
data\n{{!}}}");
add("selser", "Build table with {{!}} [1]", "{{{!}} class=\"wikitable\"
data-foobar=\"n7vob9kcmjp833di\"\n! header\n! second header\n{{!}}-
style=\"color:red;\"\n{{!}} data {{!}}{{!}} style=\"color:red;\" {{!}} second
data\n{{!}}}");
add("selser", "Build table with {{!}} [[0,2]]", "{{{!}}
class=\"wikitable\"\n<!--gzqyxjo46o91kyb9-->! header\n! second header\n{{!}}-
style=\"color:red;\"\n{{!}} data {{!}}{{!}} style=\"color:red;\" {{!}} second
data\n{{!}}}");
+add("selser", "Build table with {{!}} [[4,[4,0,2,0]]]", "{{{!}}
class=\"wikitable\"<!--iq95chc97oxn7b9--><!--4skrg9xv6pbhjjor-->\n<!--qmcjyl6r854p9zfr-->{{!}}-
style=\"color:red;\"\n{{!}} data {{!}}{{!}} style=\"color:red;\" {{!}} second
data\n{{!}}}");
add("selser", "Build table with {{!}} [[4,2]]", "{{{!}}
class=\"wikitable\"<!--wa7mbefsy7nfjemi--><!--8sf0msj7spmbo6r-->\n! header\n!
second header\n{{!}}- style=\"color:red;\"\n{{!}} data {{!}}{{!}}
style=\"color:red;\" {{!}} second data\n{{!}}}");
add("selser", "Build table with {{!}} [[2,2]]", "{{{!}}
class=\"wikitable\"<!--hbgluiuyj95asjor-->\n<!--xss2k4vz6txd2t9-->! header\n!
second header\n{{!}}- style=\"color:red;\"\n{{!}} data {{!}}{{!}}
style=\"color:red;\" {{!}} second data\n{{!}}}");
add("selser", "Build table with {{!}} [[4,1]]", "{{{!}}
class=\"wikitable\"<!--q4x91ifb5ku766r-->\n! header\n! second header\n{{!}}-
style=\"color:red;\"\n{{!}} data {{!}}{{!}} style=\"color:red;\" {{!}} second
data\n{{!}}}");
@@ -1981,6 +1994,7 @@
add("selser", "Build table with pipe as data [[3,2]]", "{|
class=\"wikitable\"<!--0g4x735w6hcl3di-->\n! header\n! second header\n|-
style=\"color:red;\"\n| data || style=\"color:red;\" | second data\n|-\n|
style=\"color:red;\" | data with | || style=\"color:red;\" | second data with
|\n|-\n|| data with | ||| second data with |\n|}");
add("selser", "Build table with pipe as data [2]", "lmhnucjqwqctmx6r\n{|
class=\"wikitable\"\n! header\n! second header\n|- style=\"color:red;\"\n| data
|| style=\"color:red;\" | second data\n|-\n| style=\"color:red;\" | data with |
|| style=\"color:red;\" | second data with |\n|-\n|| data with | ||| second
data with |\n|}");
add("selser", "Build table with pipe as data [1]", "{| class=\"wikitable\"
data-foobar=\"lalglq06kuf03sor\"\n! header\n! second header\n|-
style=\"color:red;\"\n| data || style=\"color:red;\" | second data\n|-\n|
style=\"color:red;\" | data with | || style=\"color:red;\" | second data with
|\n|-\n|| data with | ||| second data with |\n|}");
+add("selser", "Build table with pipe as data
[[4,[[[4],3,2],2,[0,[3],3],0,[0,1,[2]],4,2,0]]]", "{|
class=\"wikitable\"<!--9ei1365qdb98jjor-->\n!e7jk4mefbz4fs9k9\n!ovbodp15h8mpldi\n!
second header<!--xhuec55czqwipb9-->\n|- style=\"color:red;\"\n|\n|-\n|
style=\"color:red;\" data-foobar=\"gfcix9klmigdgqfr\" |<nowiki> data with |
</nowiki>|| style=\"color:red;\" |zp74kkx3itokzkt9 second data with
|<!--5r6q0h5oa2lnmi--><!--noh3n1jqz392j4i-->\n|-\n|| data with | ||| second
data with |\n|}");
add("selser", "Build table with pipe as data [[0,1]]", "{|
class=\"wikitable\"\n! header\n! second header\n|- style=\"color:red;\"\n| data
|| style=\"color:red;\" | second data\n|-\n| style=\"color:red;\" | data with |
|| style=\"color:red;\" | second data with |\n|-\n|| data with | ||| second
data with |\n|}");
add("selser", "Build table with pipe as data
[[0,[[3,0,4],0,[3,2,4],0,0,3,[3,3,4],0]]]", "{|
class=\"wikitable\"\n\n|89vo0bmcsbkv5cdi\n|-
style=\"color:red;\"\n|zwnhagffqiqhyqfr\n| data \n|dju7n7jhc15rk9\n|-\n|
style=\"color:red;\" | data with | || style=\"color:red;\" | second data with
|\n|-\n|lljma7s674vrhpvi\n|}");
add("selser", "Build table with pipe as data [[2,2]]", "{|
class=\"wikitable\"<!--hw4dq390xgk3xr-->\n<!--uqj5x3w6iwndbo6r-->! header\n!
second header\n|- style=\"color:red;\"\n| data || style=\"color:red;\" | second
data\n|-\n| style=\"color:red;\" | data with | || style=\"color:red;\" | second
data with |\n|-\n|| data with | ||| second data with |\n|}");
@@ -2126,7 +2140,8 @@
add("selser", "BUG 553: link with two variables in a piped link [1]", "{|
data-foobar=\"sermfvbsbpujtt9\"\n|[[{{{1}}}|{{{2}}}]]\n|}");
add("selser", "BUG 553: link with two variables in a piped link
[[0,[[[0,0,0,0,2]],2]]]",
"{|\n|[[{{{1}}}|{{{2}}}67x19euoicw61or]]<!--jadn53w2sr79zfr-->\n|}");
add("selser", "BUG 553: link with two variables in a piped link [[0,[0,4]]]",
"{|\n|[[{{{1}}}|{{{2}}}]]<!--5luam4tixnbl0udi-->\n|}");
-add("selser", "BUG 553: link with two variables in a piped link [[0,[2,0]]]",
"ekt298jbktjoflxr\n{|\n|[[{{{1}}}|{{{2}}}]]\n|}");
+add("selser", "BUG 553: link with two variables in a piped link [[0,[2,2]]]",
"{|\n<!--2l9bvsosq2iq9f6r-->|[[{{{1}}}|{{{2}}}]]<!--f21xzcxsl9iwl8fr-->\n|}");
+add("selser", "BUG 553: link with two variables in a piped link [[0,[2,0]]]",
"{|\n<!--ekt298jbktjoflxr-->|[[{{{1}}}|{{{2}}}]]\n|}");
add("selser", "BUG 553: link with two variables in a piped link [2]",
"riybxbthicfskyb9\n{|\n|[[{{{1}}}|{{{2}}}]]\n|}");
add("selser", "BUG 553: link with two variables in a piped link [[0,2]]",
"{|\n<!--z79xd4wgjxphw7b9-->|[[{{{1}}}|{{{2}}}]]\n|}");
add("selser", "Template with targets containing wikilinks [4,0,1,2,1]",
"p8pza9iyg3yaxlxr\n\n<nowiki>{{</nowiki>[[{{echo|foo}}]]}}\n\ndf60zk0z1v8ia4i\n\n{{{{echo|[[foo}}]]}}");
@@ -2148,14 +2163,17 @@
add("selser", "1. Table tag in SOL posn. should get reparsed correctly with
valid TSR [0,[0,[0,2]]]", "{{echo|}}{| width =
'100%'\n|foo<!--7w2da44bn7idaemi-->\n|}");
add("selser", "1. Table tag in SOL posn. should get reparsed correctly with
valid TSR [0,1]", "{{echo|}}{| width=\"100%\"
data-foobar=\"t98xv1gnmkhp8pvi\"\n|foo\n|}");
add("selser", "1. Table tag in SOL posn. should get reparsed correctly with
valid TSR [0,[0,[[[2]],3]]]", "{{echo|}}{| width =
'100%'\n|5l8xeq1crrafw29foo\n|}");
+add("selser", "1. Table tag in SOL posn. should get reparsed correctly with
valid TSR [0,[4,[4,2]]]", "{{echo|}}{| width =
'100%'<!--913di70icp85xw29--><!--8ypcl8eh8xx8yqfr--><!--l2z1wp6p0xwxko6r-->\n|}");
+add("selser", "1. Table tag in SOL posn. should get reparsed correctly with
valid TSR [0,[4,[2,0]]]", "{{echo|}}{| width =
'100%'<!--8h981ha9l6myrpb9--><!--dnzxupmh4eptlnmi-->\n|foo\n|}");
add("selser", "1. Table tag in SOL posn. should get reparsed correctly with
valid TSR [0,[4,[3,0]]]", "{{echo|}}{| width =
'100%'<!--4w5gtskk09ou5wmi-->\n|}");
add("selser", "1. Table tag in SOL posn. should get reparsed correctly with
valid TSR [0,2]", "{{echo|}}nbv262u96o3cjtt9\n{| width = '100%'\n|foo\n|}");
add("selser", "1. Table tag in SOL posn. should get reparsed correctly with
valid TSR [0,[0,1]]", "{{echo|}}{| width = '100%'\n|foo\n|}");
add("selser", "1. Table tag in SOL posn. should get reparsed correctly with
valid TSR [0,[0,[[3],0]]]", "{{echo|}}{| width = '100%'\n\n|}");
add("selser", "1. Table tag in SOL posn. should get reparsed correctly with
valid TSR [0,[0,[1,4]]]", "{{echo|}}{| width =
'100%'\n|foo<!--ls9rf79zvd8fflxr-->\n|}");
add("selser", "1. Table tag in SOL posn. should get reparsed correctly with
valid TSR [0,[0,[[3],3]]]", "{{echo|}}{| width = '100%'\n|}");
-add("selser", "1. Table tag in SOL posn. should get reparsed correctly with
valid TSR [0,[0,[2,0]]]", "{{echo|}}gqnq56unxcu9pb9\n{| width =
'100%'\n|foo\n|}");
+add("selser", "1. Table tag in SOL posn. should get reparsed correctly with
valid TSR [0,[0,[2,0]]]", "{{echo|}}{| width =
'100%'\n<!--gqnq56unxcu9pb9-->|foo\n|}");
add("selser", "1. Table tag in SOL posn. should get reparsed correctly with
valid TSR [0,[0,[[[3]],3]]]", "{{echo|}}{| width = '100%'\n|\n|}");
+add("selser", "1. Table tag in SOL posn. should get reparsed correctly with
valid TSR [0,[0,[4,0]]]", "{{echo|}}{| width =
'100%'\n<!--u3at1qt3epfd2t9-->\n|}");
add("selser", "1. Table tag in SOL posn. should get reparsed correctly with
valid TSR [0,[3,[1,0]]]", "{{echo|}}{| width = '100%'\n|foo\n|}");
add("selser", "1. Table tag in SOL posn. should get reparsed correctly with
valid TSR [0,[0,[[1],4]]]", "{{echo|}}{| width = '100%'\n|
data-foobar=\"pnyys77mkaxrms4i\" |foo<!--kok37wstwgbvs4i-->\n|}");
add("selser", "Templates: P-wrapping: 1d. Template preceded by comment-only
line [2,0,0]", "i0wqqfgpkyjsjor\n<!-- foo -->\n{{echo|Bar}}");
@@ -2175,7 +2193,7 @@
add("selser", "Templates: HTML Tables: 5. Proper fostering of categories from
inside [0,3,2,4,3,3,0,4]",
"\nhdu8b5un73rw9udi\n\naxxk36cxrg0newmi\nl6db7w99encm1jor\n");
add("selser", "Templates: HTML Tables: 5. Proper fostering of categories from
inside [0,2,4,4,4,4,2,0]",
"\n3p6ds2cdy5geqaor<table>[[Category:foo1]]<tr><td>foo</td></tr></table>nf31cc8xo4leg66r\n\nirxbftzactprpb9\n\ndd21qg54ruw0cnmi\n\nv7gjnsdqspnqxgvi\n\nzg2izvkgtlu15rk9<table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>");
add("selser", "Templates: HTML Tables: 5. Proper fostering of categories from
inside [0,3,2,0,2,4,0,2]", "\n5hat330odnmw8kt9\n\n<!--Two categories (Bug
50330)-->6ssl3a5gpeqaor\n\novgd20ux77722o6r\nkjuzhgsj82blz0k9<table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>");
-add("selser", "Templates: HTML Tables: 5. Proper fostering of categories from
inside [2,3,2,2,0,0,0,[[4]]]",
"pr6u7tvu4zccjtt9\nbzwx5yz7n0y0hpvi\n\nsqg8knvzd26gvi<!--Two categories (Bug
50330)-->\n\nigfmiz8r7rykfbt9<table></table>");
+add("selser", "Templates: HTML Tables: 5. Proper fostering of categories from
inside [2,3,2,2,0,0,0,[[4]]]",
"pr6u7tvu4zccjtt9\nbzwx5yz7n0y0hpvi\n\nsqg8knvzd26gvi<!--Two categories (Bug
50330)-->\n<table><!--igfmiz8r7rykfbt9--></table>");
add("selser", "Templates: HTML Tables: 5. Proper fostering of categories from
inside [0,1,4,0,0,0,1,[2]]", "<table
data-foobar=\"16hnpb0od17l23xr\">[[Category:foo1]]<tr><td>foo</td></tr></table>p0tte61pcmh7iudi<!--Two
categories (Bug
50330)-->\n[[Category:bar2]]<table><!--8rm0h9nhoqkc5wmi-->[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>");
add("selser", "Templates: HTML Tables: 5. Proper fostering of categories from
inside [0,[2],0,2,2,0,0,[1]]",
"<table><!--c0u2c9uer91cerk9-->[[Category:foo1]]<tr><td>foo</td></tr></table>\n8hyzimw3d00vbo6r\n\n<!--Two
categories (Bug
50330)-->12c9zldofglj714i\n<table><tr><td>foo</td></tr></table>");
add("selser", "Templates: HTML Tables: 5. Proper fostering of categories from
inside [0,[[3]],2,0,0,4,0,[[[4]]]]", "<table></table>frdce0reto2h85mi\n<!--Two
categories (Bug
50330)-->\n3lz5b6rsfydjkyb9<table><tr><td>6xqvzsggdh392j4i</td></tr></table>");
@@ -2275,7 +2293,7 @@
add("selser", "Table multiple attributes correction [[0,[1,3]]]", "{|\n!+
class=\"error\" class=\"awesome\"| status\n|}");
add("selser", "Table multiple attributes correction [[4,1]]",
"{|<!--hp0nnumivla6ecdi-->\n!+ class=\"error\" class=\"awesome\"| status\n|}");
add("selser", "Table multiple attributes correction [[3,2]]",
"{|<!--42sj7fkd0anpzaor-->\n!+ class=\"error\" class=\"awesome\"| status\n|}");
-add("selser", "Table multiple attributes correction [[0,[2,0]]]",
"k6lgk37x5g0hpvi\n{|\n!+ class=\"error\" class=\"awesome\"| status\n|}");
+add("selser", "Table multiple attributes correction [[0,[2,0]]]",
"{|\n<!--k6lgk37x5g0hpvi-->!+ class=\"error\" class=\"awesome\"| status\n|}");
add("selser", "DIV IN UPPERCASE [2]", "qcqx475zv4c2fbt9<DIV ID=\"x\">HTML
ROCKS</DIV>");
add("selser", "DIV IN UPPERCASE [[2]]", "<DIV ID=\"x\">0lhea1vi5vfs9k9HTML
ROCKS</DIV>");
add("selser", "DIV IN UPPERCASE [[4]]", "<DIV
ID=\"x\">ae3oduwc950tqpvi</DIV>");
@@ -2340,7 +2358,7 @@
add("selser", "Table attribute safety [2]", "zwfo2kxs5fa5g66r\n{|\n!+
style=\"<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>\"|
status\n|}");
add("selser", "Table attribute safety [[0,2]]", "{|\n<!--8o73uov10ad1jor-->!+
style=\"<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>\"|
status\n|}");
add("selser", "Table attribute safety [[0,[[[2]],0]]]", "{|\n!+
style=\"<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>\"|bmw4i6d4sxidlsor
status\n|}");
-add("selser", "Table attribute safety [[0,[2,0]]]", "hopuq8owdrv8to6r\n{|\n!+
style=\"<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>\"|
status\n|}");
+add("selser", "Table attribute safety [[0,[2,0]]]",
"{|\n<!--hopuq8owdrv8to6r-->!+
style=\"<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>\"|
status\n|}");
add("selser", "Table attribute safety [[0,[0,3]]]", "{|\n!+
style=\"<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>\"|
status\n|}");
add("selser", "Table attribute safety [[0,[1,2]]]", "{|\n!+
style=\"<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>\"|
status<!--skyjeiq2kwr0be29-->\n|}");
add("selser", "Sanitizer: Validating that <meta> and <link> work, but only for
Microdata [[0,1,4]]", "<div itemscope>\n\t<nowiki><meta itemprop=\"hello\"
content=\"world\">\n\t<meta http-equiv=\"refresh\" content=\"5\">\n\t<meta
itemprop=\"hello\" http-equiv=\"refresh\" content=\"5\">\n\t<link
itemprop=\"hello\" href=\"{{SERVER}}\">\n\t<link rel=\"stylesheet\"
href=\"{{SERVER}}\">\n\t<link rel=\"stylesheet\" itemprop=\"hello\"
href=\"{{SERVER}}\"></nowiki>\n9lxnoixxq085b3xr</div>");
@@ -2390,18 +2408,21 @@
add("selser", "Fuzz testing: Parser16 [[0,[[3,4,0,0]]]]",
"{|\n!mn06fxy5uvbfn7b9|||||}");
add("selser", "Fuzz testing: Parser16 [[3,2]]",
"{|<!--4qmpsasspil4bo6r-->\n!https://|||||||}");
add("selser", "Fuzz testing: Parser16 [[0,1]]", "{|\n!https://|||||||}");
+add("selser", "Fuzz testing: Parser16 [[3,[2]]]",
"{|<!--fqa9lrr74yflmcxr-->\n!https://|||||||}");
add("selser", "Fuzz testing: Parser16 [[0,[[1,1,1,0]]]]", "{|\n!
data-foobar=\"zu74dq5r4l5wmi\" |https://|| data-foobar=\"at9q2rxpkvivbo6r\" |||
data-foobar=\"knfvnx3swhppsyvi\" ||||}");
add("selser", "Fuzz testing: Parser16 [[0,[[0,2,4,2]]]]",
"{|\n!https://\n!yojby2s147usdcxr||\n!v7e4oycgqkqehfr\n!k6xurl8iqpz257b9|||}");
add("selser", "Fuzz testing: Parser16 [1]", "{|
data-foobar=\"rwdbutcm2hbprpb9\"\n!https://|||||||}");
add("selser", "Fuzz testing: Parser16 [[2,[1]]]",
"{|<!--qd4b7r8tzb79cnmi-->\n!https://|||||||}");
add("selser", "Fuzz testing: Parser21 [[2,2]]",
"{|<!--fqbthlkw80cf2yb9-->\n<!--5e3ophtbp1jg7gb9-->! irc://{{ftp://a\"
onmouseover=\"alert('hello world');\"\n||}");
add("selser", "Fuzz testing: Parser21 [1]", "{|
data-foobar=\"kaeydswgfnxnipb9\"\n! irc://{{ftp://a\"
onmouseover=\"alert('hello world');\"\n||}");
+add("selser", "Fuzz testing: Parser21 [[4,[2]]]",
"{|<!--kky0a6mymhwfusor--><!--we67bat81qlx47vi-->\n! irc://{{ftp://a\"
onmouseover=\"alert('hello world');\"\n||}");
add("selser", "Fuzz testing: Parser21 [[3,[1]]]", "{|\n! irc://{{ftp://a\"
onmouseover=\"alert('hello world');\"\n||}");
add("selser", "Fuzz testing: Parser21 [[0,[[[0,2,0],0,0]]]]", "{|\n!
6ro52eq6kkzf47vi<nowiki/>irc://{{ftp://a\" onmouseover=\"alert('hello
world');\"\n||}");
add("selser", "Fuzz testing: Parser21 [[2,[[3,0,0]]]]",
"{|<!--91khydnxj2it3xr-->\n\n||}");
add("selser", "Fuzz testing: Parser21 [[0,[[[4,[4],0],0,0]]]]",
"{|\n!1z6izy471osf9a4i[irc://{{ftp://a 35m7cjzb2mrhpvi]\"
onmouseover=\"alert('hello world');\"\n||}");
add("selser", "Fuzz testing: Parser21 [2]", "k8ttddjg2wxez5mi\n{|\n!
irc://{{ftp://a\" onmouseover=\"alert('hello world');\"\n|");
-add("selser", "Fuzz testing: Parser21 [[0,[2]]]", "s2ilax302x6o5hfr\n{|\n!
irc://{{ftp://a\" onmouseover=\"alert('hello world');\"\n|");
+add("selser", "Fuzz testing: Parser21 [[2,[2]]]",
"{|<!--10dd0n612botj4i-->\n<!--9woo9t4yzpmygb9-->! irc://{{ftp://a\"
onmouseover=\"alert('hello world');\"\n||}");
+add("selser", "Fuzz testing: Parser21 [[0,[2]]]",
"{|\n<!--s2ilax302x6o5hfr-->! irc://{{ftp://a\" onmouseover=\"alert('hello
world');\"\n||}");
add("selser", "Fuzz testing: Parser21 [[0,[[[2,1,2],4,1]]]]",
"{|\n!7wl5fvufhdaq0k9 irc://{{ftp://a<nowiki/>bhnjk55ovtvuz0k9\"
onmouseover=\"alert('hello world');\"\n!7wmp05ki8ophw7b9\n|
data-foobar=\"1y26x0gu7tbotj4i\" ||}");
add("selser", "Fuzz testing: Parser21 [[3,[[2,0,0]]]]",
"{|\n|bsnckhcoibai3sor\n! irc://{{ftp://a\" onmouseover=\"alert('hello
world');\"\n||}");
add("selser", "Fuzz testing: Parser21 [[3,1]]", "{|\n! irc://{{ftp://a\"
onmouseover=\"alert('hello world');\"\n||}");
@@ -2429,6 +2450,7 @@
add("selser", "Fuzz testing: Parser24 [[1,0,0],0,3]", "{{{|\n<u class=\"|\"
{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}}>\n<br
style=\"onmouseover='alert(document.cookie);' \" />\n");
add("selser", "Fuzz testing: Parser24 [1,2,[0,[3]]]", "{{{|\n<u class=\"|\"
{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}}>\n<br
style=\"onmouseover='alert(document.cookie);' \"
/>\n\n2ee2y1k6jblkrzfr\n\n{|\n\n|}");
add("selser", "Fuzz testing: Parser24 [[2,4,0],0,3]",
"2h96h5bmgi2lz0k9{{{7nrcllfxlygmn29<u class=\"|\"
{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}}>\n<br
style=\"onmouseover='alert(document.cookie);' \" />\n");
+add("selser", "Fuzz testing: Parser24 [4,4,[3,[2]]]",
"vtpmggos1rxm9529\n\ntg1e2avwggbymn29\n{|<!--yi16pa7w3cv7vi-->\n||}");
add("selser", "Fuzz testing: Parser24 [[1,2,0],2,3]",
"{{{6xvikssdmi4zehfr|\n<u class=\"|\"
{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}}>\n<br
style=\"onmouseover='alert(document.cookie);' \" />\n\nwvwpzfhipqqfflxr\n\n\n");
add("selser", "Fuzz testing: Parser24 [[1,2,0],0,4]",
"{{{sk3rl6utosgojemi|\n<u class=\"|\"
{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}}>\n<br
style=\"onmouseover='alert(document.cookie);' \" />\n\n\n\njzny1t7i47mygb9\n");
add("selser", "Fuzz testing: Parser24 [1,1,2]", "{{{|\n<u class=\"|\"
{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}}>\n<br
style=\"onmouseover='alert(document.cookie);' \" />\n\nMOVE YOUR MOUSE CURSOR
OVER THIS TEXT\n\nwo1ljwyi3jlzbyb9\n{|\n{{{|\n<u CLASS=\n|
{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >\n<br
style=\"onmouseover='alert(document.cookie);' \" />\n\nMOVE YOUR MOUSE CURSOR
OVER THIS TEXT\n|");
@@ -2711,7 +2733,7 @@
add("selser", "Parsoid-only: HTML tag with broken attribute value quoting
[[[2]]]", "<span title=\"Hello world>3i3ony861ht49529Foo</span>");
add("selser", "Parsoid-only: HTML tag with broken attribute value quoting
[[[4]]]", "<span title=\"Hello world>stonzy9orpt1q0k9</span>");
add("selser", "Table with broken attribute value quoting [2]",
"mr20rqhubuwstt9\n{|\n| title=\"Hello world|Foo\n|}");
-add("selser", "Table with broken attribute value quoting [[0,[2,0]]]",
"ntjtaez0pi0h33di\n{|\n| title=\"Hello world|Foo\n|}");
+add("selser", "Table with broken attribute value quoting [[0,[2,0]]]",
"{|\n<!--ntjtaez0pi0h33di-->| title=\"Hello world|Foo\n|}");
add("selser", "Table with broken attribute value quoting [[4,1]]",
"{|<!--aai5lsutuhht1emi-->\n| title=\"Hello world|Foo\n|}");
add("selser", "Table with broken attribute value quoting [[0,[[[2]],0]]]",
"{|\n| title=\"Hello world|5ra5tvh3r39grpb9Foo\n|}");
add("selser", "Table with broken attribute value quoting [[0,1]]", "{|\n|
title=\"Hello world|Foo\n|}");
@@ -2736,12 +2758,13 @@
add("selser", "RT-ed inter-element separators should be valid separators [2]",
"zpuyqbdlibj1nhfr\n{|\n|- [[foo]]\n|}");
add("selser", "RT-ed inter-element separators should be valid separators
[[4,[0,2]]]", "{|<!--72wprvcrqcsxajor-->\n|-
[[foo]]<!--fo1qvsdgv3xtuik9-->\n|}");
add("selser", "RT-ed inter-element separators should be valid separators
[[4,2]]", "{|<!--j8hwklray6ekx1or--><!--p7v1guykesl9pb9-->\n|- [[foo]]\n|}");
+add("selser", "RT-ed inter-element separators should be valid separators
[[0,[2,4]]]", "{|\n<!--illxemer9nrpy14i-->|-
[[foo]]<!--sxxrpf8t8m48ia4i-->\n|}");
add("selser", "RT-ed inter-element separators should be valid separators
[[0,[0,2]]]", "{|\n|- [[foo]]<!--qyiayk5wxhn9izfr-->\n|}");
add("selser", "RT-ed inter-element separators should be valid separators
[[4,0]]", "{|<!--a467voa6hewdygb9-->\n|- [[foo]]\n|}");
add("selser", "Trailing newlines in a deep dom-subtree that ends a wikitext
line should be migrated out [2,4,2]",
"oxcq39cyuk07wrk9\n{|\n|<small>foo\nbar\n|}\nbtnbac04guj46lxr\n\ni10ii39io6hqto6r\n{|\n|<small>foo<small>\n|}");
add("selser", "Trailing newlines in a deep dom-subtree that ends a wikitext
line should be migrated out [[0,[[1],4]],3,[0,[[[[4,0]]],0]]]", "{|\n|
data-foobar=\"6esm1j2nehup7gb9\"
|<small>foo\nbar<!--t9z6766d6n06yldi-->\n|}\n{|\n|<small>4j0561nruz19vn29<small>\n|}");
add("selser", "Trailing newlines in a deep dom-subtree that ends a wikitext
line should be migrated out [2,0,3]",
"zx1dph1o9tpam7vi\n{|\n|<small>foo\nbar\n|}\n");
-add("selser", "Trailing newlines in a deep dom-subtree that ends a wikitext
line should be migrated out [2,0,[2,[2,0]]]",
"i90l9omchljl9pb9\n{|\n|<small>foo\nbar\n|}\n\n14v0774pz99hpvi\n{|<!--aly77j0vv46de7b9-->\n|<small>foo<small>\n|}");
+add("selser", "Trailing newlines in a deep dom-subtree that ends a wikitext
line should be migrated out [2,0,[2,[2,0]]]",
"i90l9omchljl9pb9\n{|\n|<small>foo\nbar\n|}\n\n{|<!--aly77j0vv46de7b9-->\n<!--14v0774pz99hpvi-->|<small>foo<small>\n|}");
add("selser", "Empty TD followed by TD with tpl-generated attribute [1]", "{|
data-foobar=\"jgkmcix8xedsra4i\"\n|-\n|\n|{{echo|style='color:red'}}|foo\n|}");
add("selser", "Empty TD followed by TD with tpl-generated attribute [2]",
"r7gp18ucnccsdcxr\n{|\n|-\n|\n|{{echo|style='color:red'}}|foo\n|}");
add("selser", "Empty TD followed by TD with tpl-generated attribute
[[0,[[2,0,0,0],0]]]",
"{|\n|-\n|1a4bk95i0u9885mi\n|\n|{{echo|style='color:red'}}|foo\n|}");
@@ -2749,6 +2772,7 @@
add("selser", "Empty TD followed by TD with tpl-generated attribute
[[0,[1,4]]]", "{|\n|-
data-foobar=\"0532xsqruk32fbt9\"\n|\n|{{echo|style='color:red'}}|foo<!--tn18t2s8bb6b6gvi-->\n|}");
add("selser", "Empty TD followed by TD with tpl-generated attribute [[0,2]]",
"{|\n<!--anfn90dygsvbcsor-->|-\n|\n|{{echo|style='color:red'}}|foo\n|}");
add("selser", "Empty TD followed by TD with tpl-generated attribute [[4,2]]",
"{|<!--3z7wqf2lpjdlhaor--><!--c7w2sjrg7jozjjor-->\n|-\n|\n|{{echo|style='color:red'}}|foo\n|}");
+add("selser", "Empty TD followed by TD with tpl-generated attribute
[[4,[2,0]]]",
"{|<!--2bvfx9ybokmrhpvi--><!--gyubsw35fbeasjor-->\n|-\n|\n|{{echo|style='color:red'}}|foo\n|}");
add("selser", "Empty TD followed by TD with tpl-generated attribute [[0,1]]",
"{|\n|-\n|\n|{{echo|style='color:red'}}|foo\n|}");
add("selser", "Empty TD followed by TD with tpl-generated attribute
[[3,[[0,2,0,0],0]]]",
"{|\n|-\n|t1833l938cq2rzfr\n|\n|{{echo|style='color:red'}}|foo\n|}");
add("selser", "Empty TD followed by TD with tpl-generated attribute
[[3,[[4,0,0,0],4]]]",
"{|\n|-\n|9vflhnc8lefgk3xr\n|\n|{{echo|style='color:red'}}|foo<!--w612epsbwkf8yqfr-->\n|}");
diff --git a/tests/parserTests.js b/tests/parserTests.js
index 968d76e..a5f6417 100755
--- a/tests/parserTests.js
+++ b/tests/parserTests.js
@@ -522,7 +522,7 @@
}
}
break;
- case 'BODY' : wrapperName = 'P'; break;
+ case 'BODY': wrapperName = 'P'; break;
default:
if (DU.isBlockNodeWithVisibleWT(n)) {
wrapperName = 'P';
@@ -530,11 +530,11 @@
break;
}
- if (wrapperName) {
+ if (DU.isFosterablePosition(n) && n.parentNode.nodeName !==
'TR') {
+ newNode = ownerDoc.createComment(str);
+ } else if (wrapperName) {
newNode = ownerDoc.createElement(wrapperName);
newNode.appendChild(ownerDoc.createTextNode(str));
- } else if (DU.isFosterablePosition(n)) {
- newNode = ownerDoc.createComment(str);
} else {
newNode = ownerDoc.createTextNode(str);
}
--
To view, visit https://gerrit.wikimedia.org/r/226096
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8578809a2caf90df67de138c9fdf1668d94aa8af
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