From: C. Scott Ananian foo'
foo'
+ foo''
foo''
+
foo +
+!! html/parsoid +foo +
+!! end + ### ### 3-quote opening sequence tests @@ -580,17 +621,32 @@ Italics and bold: 3-quote opening sequence: (3,3) !! test Italics and bold: 3-quote opening sequence: (3,4) +!! options +parsoid=wt2html !! wikitext '''foo'''' -!! html +!! html/*foo'
!!end +# same html as previous, but wikitext adjusted to match parsoid html2wt +!! test +Italics and bold: 3-quote opening sequence: (3,4) w/ nowiki +!! wikitext +'''foo' +
+!! end + + # The PHP parser strips the empty tags out for giggles; parsoid doesn't. !! test Italics and bold: 3-quote opening sequence: (3,5) +!! options +parsoid=wt2html !! wikitext '''foo''''' !! html/php @@ -601,6 +657,19 @@ Italics and bold: 3-quote opening sequence: (3,5) !!end +# same html as previous, but wikitext adjusted to match parsoid html2wt +!! test +Italics and bold: 3-quote opening sequence: (3,5+2) w/ nowiki +!! wikitext +'''foo'''''foo +
+!! html/parsoid +foo +
+!! end + ### ### 4-quote opening sequence tests @@ -608,14 +677,27 @@ Italics and bold: 3-quote opening sequence: (3,5) !! test Italics and bold: 4-quote opening sequence: (4,2) +!! options +parsoid=wt2html !! wikitext ''''foo'' -!! html +!! html/*''foo
!!end +# same html as previous, but wikitext adjusted to match parsoid html2wt +!! test +Italics and bold: 4-quote opening sequence: (4,2) w/ nowiki +!! wikitext +''foo +
+!! end + + !! test Italics and bold: 4-quote opening sequence: (4,3) !! wikitext @@ -628,17 +710,32 @@ Italics and bold: 4-quote opening sequence: (4,3) !! test Italics and bold: 4-quote opening sequence: (4,4) +!! options +parsoid=wt2html !! wikitext ''''foo'''' -!! html +!! html/*'foo'
!!end +# same html as previous, but wikitext adjusted to match parsoid html2wt +!! test +Italics and bold: 4-quote opening sequence: (4,4) w/ nowiki +!! wikitext +'''''foo' +
+!! end + + # The PHP parser strips the empty tags out for giggles; parsoid doesn't. !! test Italics and bold: 4-quote opening sequence: (4,5) +!! options +parsoid=wt2html !! wikitext ''''foo''''' !! html/php @@ -649,6 +746,19 @@ Italics and bold: 4-quote opening sequence: (4,5) !!end +# same html as previous, but wikitext adjusted to match parsoid html2wt +!! test +Italics and bold: 4-quote opening sequence: (4,5+2) w/ nowiki +!! wikitext +''''foo''''''foo +
+!! html/parsoid +'foo +
+!! end + ### ### 5-quote opening sequence tests @@ -657,34 +767,74 @@ Italics and bold: 4-quote opening sequence: (4,5) !! test Italics and bold: 5-quote opening sequence: (5,2) !! options +parsoid=wt2html !! wikitext '''''foo'' -!! html +!! html/*foo
!!end +# same html as previous, but wikitext adjusted to match parsoid html2wt +# skipping wt2html and html2html because it wants to put before +!! test +Italics and bold: 5-quote opening sequence: (5,2+3) +!! options +parsoid=wt2wt,html2wt +!! wikitext +'''''foo''''' +!! html/* +foo +
+!! end + !! test Italics and bold: 5-quote opening sequence: (5,3) +!! options +parsoid=wt2html !! wikitext '''''foo''' -!! html +!! html/*foo
!!end +# same html as previous, but wikitext adjusted to match parsoid html2wt +!! test +Italics and bold: 5-quote opening sequence: (5,3+2) +!! wikitext +'''''foo''''' +!! html +foo +
+!! end + + !! test Italics and bold: 5-quote opening sequence: (5,4) +!! options +parsoid=wt2html !! wikitext '''''foo'''' -!! html +!! html/*foo'
!!end +# same html as previous, but wikitext adjusted to match parsoid html2wt +!! test +Italics and bold: 5-quote opening sequence: (5,4+2) w/ nowiki +!! wikitext +'''''foo' +
+!! end + + !! test Italics and bold: 5-quote opening sequence: (5,5) !! wikitext @@ -699,37 +849,78 @@ Italics and bold: 5-quote opening sequence: (5,5) ### !! test Italics and bold: multiple quote sequences: (2,4,2) +!! options +parsoid=wt2html !! wikitext ''foo''''bar'' -!! html +!! html/*foo'bar
!!end +# same html as previous, but wikitext adjusted to match parsoid html2wt +!! test +Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki +!! wikitext +''foo'bar +
+!! end + + !! test Italics and bold: multiple quote sequences: (2,4,3) +!! options +parsoid=wt2html !! wikitext ''foo''''bar''' -!! html +!! html/*foo'bar
!!end +# same html as previous, but wikitext adjusted to match parsoid html2wt +!! test +Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki +!! wikitext +''foo'bar +
+!! end + + !! test Italics and bold: multiple quote sequences: (2,4,4) +!! options +parsoid=wt2html !! wikitext ''foo''''bar'''' -!! html +!! html/*foo'bar'
!!end +# same html as previous, but wikitext adjusted to match parsoid html2wt +!! test +Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki +!! wikitext +''foo'bar' +
+!! end + + # The PHP parser strips the empty tags out for giggles; parsoid doesn't. !! test Italics and bold: multiple quote sequences: (3,4,2) +!! options +parsoid=wt2html !! wikitext '''foo''''bar'' !! html/php @@ -740,10 +931,27 @@ Italics and bold: multiple quote sequences: (3,4,2) !!end +# same html as previous, but wikitext adjusted to match parsoid html2wt +!! test +Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki +!! options +parsoid +!! wikitext +'''foo'bar +
+!! html/parsoid +foo'bar +
+!! end + # The PHP parser strips the empty tags out for giggles; parsoid doesn't. !! test Italics and bold: multiple quote sequences: (3,4,3) +!! options +parsoid=wt2html !! wikitext '''foo''''bar''' !! html/php @@ -754,6 +962,19 @@ Italics and bold: multiple quote sequences: (3,4,3) !!end +# same html as previous, but wikitext adjusted to match parsoid html2wt +!! test +Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki +!! wikitext +'''foo'bar +
+!! html/parsoid +foo'bar +
+!! end + ### ### other quote tests ### @@ -779,14 +1000,30 @@ Italics and bold: other quote tests: (2,(3,3),2) !! test Italics and bold: other quote tests: (3,2,3,2) +!! options +parsoid=wt2html !! wikitext '''this is about ''foo'''s family'' -!! html +!! html/*this is about foos family
!!end +# same html as previous, but wikitext adjusted to match parsoid html2wt +# add 'parsoid' option to use 'parsoid' normalization of the placeholder +!! test +Italics and bold: other quote tests: (3,2,3+2+2,2) +!! options +parsoid +!! wikitext +'''this is about ''foo'''''this is about foos family +
+!! end + + !! test Italics and bold: other quote tests: (3,2,3,3) !! options @@ -1198,6 +1435,22 @@ b !! end +!! test +Multiple comments should still parse as SOL-transparent +!! options +parsoid=wt2html,wt2wt +!! wikitext +*a +*b +!! html +foo
+ +foo
+ +foo
+ +foo
+!!end + #-------------------------------------------------------------------- # Transclusion parameter escaping tests #-------------------------------------------------------------------- @@ -5512,6 +5788,17 @@ language=kaa !! end +!! test +Link with multiple ":" in a subpage-supporting namespace (bug 63636) +!! wikitext +[[User:Foo/Test/63636:Bar|Test]] +!! html/php +Test +
+!! html/parsoid + +!! end + !! test 1. Interaction of linktrail and template encapsulation !! options @@ -5682,16 +5969,30 @@ Interwiki link with fragment (bug 2130) # Ideally the wikipedia: prefix here should be proto-relative too !! test Different interwiki prefixes mapping to the same URL -!! options -parsoid !! wikitext +[[:en:Foo]] + +[[:en:Foo|Foo]] + [[wikipedia:Foo]] -[[:en:Foo]] -!! html - +[[:wikipedia:Foo|Foo]] + +[[wikipedia:en:Foo]] +[[:wikipedia:en:Foo]] +!! html/parsoid + + + + + + + + + + !! end !! test @@ -10800,48 +11101,36 @@ valign, and caption (existing content) !! test Parsoid-specific image handling - framed image with specific size and caption +(size is ignored) +!! options +parsoid=wt2html,wt2wt,html2html !! wikitext -[[Image:Foobar.jpg|frame|500x50px|caption]] +[[File:Foobar.jpg|frame|500x50px|caption]] !! html/parsoid !! end -!! test -Parsoid-specific image handling - framed image with specific size and caption -(existing content) -!! wikitext -[[File:Foobar.jpg|442x50px|frame|caption]] -!! html/parsoid - -!! end - !! test Parsoid-specific image handling - framed image with specific size, halign, valign, and caption +(size is ignored) +!! options +parsoid=wt2html,wt2wt,html2html !! wikitext -[[Image:Foobar.jpg|left|baseline|frame|500x50px|caption]] +[[File:Foobar.jpg|left|baseline|frame|500x50px|caption]] !! html/parsoid !! end -!! test -Parsoid-specific image handling - framed image with specific size, halign, -valign, and caption (existing content) -!! wikitext -[[File:Foobar.jpg|442x50px|frame|left|baseline|caption]] -!! html/parsoid - -!! end - !! test Parsoid-specific image handling - frameless image with specific size, border, and caption !! wikitext @@ -10884,13 +11173,33 @@ bar !! end !! test -Parsoid-specific image handling - empty caption +Parsoid-specific image handling - empty caption (1) +!! options +parsoid=wt2html,wt2wt !! wikitext [[File:Foobar.jpg|thumb|]] !! html/parsoid !! end +# empty captions don't get serialized unless we're in the "round trip" case +!! test +Parsoid-specific image handling - empty caption (2) +!! options +parsoid=html2wt +!! html/parsoid + +!! wikitext +[[File:Foobar.jpg|thumb]] +!! end + !! test Parsoid-specific image handling - whitespace caption !! wikitext @@ -10958,22 +11267,78 @@ subpage title=[[Subpage test/1/2/3/4]] !! end -# TODO: make this PHP-parser compatible! !! test Parsoid: dot-slash prefixed wikilinks -!! options -parsoid=wt2wt,wt2html,html2html !! wikitext [[./foo]] [[././bar]] [[././baz/]] -!! html - - - -!! end +!! html/php +[[./foo]] +
[[././bar]] +
[[././baz/]] +
+!! html/parsoid +[[./foo]] +
[[././bar]] +
[[././baz/]] +
+!! end + +!! test +Render invalid page names as plain text (bug 51090) +!! wikitext +[[./../foo|bar]] +[[foo�|bar]] +[[foo/.|bar]] +[[foo/..|bar]] +[[foo~~~bar]] +[[foo>bar]] +[[foo[bar]] +[[.]] +[[..]] +[[foo././bar]] + +[[{{echo|./../foo}}|bar]] +[[{{echo|foo/.}}|bar]] +[[{{echo|foo/..}}|bar]] +[[{{echo|foo~~~~bar}}]] +[[{{echo|foo>bar}}]] +[[{{echo|foo././bar}}]] +[[{{echo|foo{bar}}]] +[[{{echo|foo}bar}}]] +[[{{echo|foo[bar}}]] +[[{{echo|foo]bar}}]] +[[{{echo|foo[[./../foo|bar]] +[[foo/.|bar]] +[[foo/..|bar]] +[[foo~~~~bar]] +[[foo>bar]] +[[foo././bar]] +[[foo{bar]] +[[foo}bar]] +[[foo[bar]] +[[foo]bar]] +[[foo<bar]] +
+!!html/parsoid +[[./../foo|bar]][[foo�|bar]][[foo/.|bar]][[foo/..|bar]][[foo~~~bar]][[foo>bar]][[foo[bar]][[.]][[..]][[foo././bar]]
+[[./../foo|bar]][[foo/.|bar]][[foo/..|bar]][[foo~~~~bar]][[foo>bar]][[foo././bar]][[foo{bar]][[foo}bar]][[foo[bar]][[foo]bar]][[foo<bar]]
+!!end !! test Disabled subpages @@ -11715,6 +12080,23 @@ __NOEDITSECTION__ !! end +!! test +Single-line or multiline-comments can follow headings +!! options +parsoid=wt2html,wt2wt +!! wikitext +==foo== +==bar== +==baz== +!! html +!! end +# same html as previous, but wikitext adjusted to match parsoid html2wt +# note that wt2html and html2html will put the before the +!! test +5 quotes, code coverage +1 line w/ nowiki (1) +!! options +parsoid=wt2wt,html2wt +!! wikitext +'''''
+
+!! html/parsoid ++!! end + +# same as previous, just swapping the and +!! test +5 quotes, code coverage +1 line w/ nowiki (2) +!! wikitext +'''''
+
+!! html/parsoid ++!! end + !! test Special:Search page linking. !! wikitext @@ -19139,6 +19550,23 @@ parsoid !!end +!! test +New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly +!! options +parsoid=html2wt +!! wikitext +
new para
+ +