diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index 9245137323c..fb6d92f1321 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -583,7 +583,7 @@ Extra newlines between heading and content are swallowed (Parsoid does not)


-

a

+

a

!! end !! test @@ -3016,6 +3016,36 @@ parsoid=wt2html !! end +# Regression test to prevent problematic simplifications of parser tests +!! test +Don't paragraph-wrap empty newlines between HTML list items +!! options +parsoid=wt2html +!! wikitext +
    +
  1. foo
  2. + + + +
  3. foo
  4. +
+!! html/php+tidy +
    +
  1. foo
  2. + + + +
  3. foo
  4. +
+!! html/parsoid +
    +
  1. foo
  2. + + + +
  3. foo
  4. +
+!! end #-------------------------------------------------------------------- # Transclusion parameter whitespace stripping tests @@ -5649,8 +5679,8 @@ parsoid=wt2html,html2html

test wikilink embedded in ext link

!! html/parsoid -

wikilink embedded in ext link

-

test wikilink embedded in ext link

+

wikilink embedded in ext link

+

test wikilink embedded in ext link

!! end !! test @@ -5941,7 +5971,7 @@ External link containing double-single-quotes with no space separating the url f

La muerte de Casagemas (1901) en el sitio de Museo Picasso.

!! html/parsoid -

La muerte de Casagemas (1901) en el sitio de Museo Picasso.

+

La muerte de Casagemas (1901) en el sitio de Museo Picasso.

!! end !! test @@ -7931,7 +7961,7 @@ Broken link with fragment

Zigzagzogzagzig#zug

!! html/parsoid -

Zigzagzogzagzig#zug

+

Zigzagzogzagzig#zug

!! end !! test @@ -7952,7 +7982,7 @@ Nonexistent special page link with fragment

Special:ThisNameWillHopefullyNeverBeUsed#anchor

!! html/parsoid -

Special:ThisNameWillHopefullyNeverBeUsed#anchor

+

Special:ThisNameWillHopefullyNeverBeUsed#anchor

!! end !! test @@ -8287,7 +8317,7 @@ Link containing double-single-quotes '' (T6598)

Lista d''e paise d''o munno

!! html/parsoid -

Lista d''e paise d''o munno

+

Lista d''e paise d''o munno

!! end !! test @@ -8298,7 +8328,7 @@ Link containing double quotes and spaces

Cool "Gator"

!! html/parsoid -

Cool "Gator"

+

Cool "Gator"

!! end !! test @@ -8339,7 +8369,7 @@ Some [[Link|pretty ''italics'' and stuff]]!

Some pretty italics and stuff!

!! html/parsoid -

Some pretty italics and stuff!

+

Some pretty italics and stuff!

!! end !! test @@ -8370,9 +8400,9 @@ Link with double quotes in title part (literal) and alternate part (interpreted)

!! html/parsoid

File:Denys Savchenko ''Pentecoste''.jpg

-

''Pentecoste''

-

Pentecoste

-

Pentecoste

+

''Pentecoste''

+

Pentecoste

+

Pentecoste

!! end !! test @@ -8528,7 +8558,7 @@ title=[[Bug462]]

Bug462 Bug462

!! html/parsoid -

Bug462 Bug462

+

Bug462 Bug462

!! end !! test @@ -8554,9 +8584,11 @@ Self-link to numeric title title=[[0]] !! wikitext [[0]] -!! html +!! html/php

0

+!! html/parsoid +

0

!!end !!test @@ -8693,7 +8725,7 @@ Link with multiple ":" in a subpage-supporting namespace (T65636)

Test

!! html/parsoid -

Test

+

Test

!! end ## Mainly a sanity check for Parsoid @@ -8784,11 +8816,14 @@ parsoid=html2wt {{1x|[[Foo]]l}}s {{1x|[[Foo]]ls}} + +[[{{1x|Foo}}]]l !! html/php+tidy

Fool

Fool

Fools

Fools +

Fool

!! html/parsoid

Fool

@@ -8798,6 +8833,8 @@ parsoid=html2wt

Fools

Fools

+ +

Fool

!! end !! test @@ -8808,7 +8845,7 @@ parsoid=html2wt

Some Fools

!! html/parsoid -

Some Fools

+

Some Fools

!! end !! test @@ -8819,7 +8856,7 @@ parsoid=html2wt

Some Fools are bold and foolish

!! html/parsoid -

Some Fools are bold and foolish

+

Some Fools are bold and foolish

!! end !! article @@ -9452,9 +9489,9 @@ parsoid=wt2html,wt2wt

constructor:foo

!! html/parsoid -

constructor

+

constructor

-

constructor:foo

+

constructor:foo

!! end !! test @@ -11635,7 +11672,7 @@ Magic links: internal link to RFC (T2479)

RFC 123

!! html/parsoid -

RFC 123

+

RFC 123

!! end !! test @@ -12101,7 +12138,7 @@ This is a test template with parameter
!! html/parsoid -

This is a test template with parameter

File:Noimage.png
link caption
+

This is a test template with parameter

File:Noimage.png
link caption
!! end !! article @@ -12162,9 +12199,9 @@ Abort table cell attribute parsing on wikilink !! html/parsoid - + - +
testing two |threefour
testing two |threefour threefourtesting="two" |threefour
testing="two" |threefour
!! end @@ -12176,7 +12213,7 @@ Don't abort table cell attribute parsing if wikilink is found in template arg |} !! html/parsoid - +
Test One two "three" four
Test One two "three" four
!! end @@ -14318,7 +14355,7 @@ language=zh

hi[1] hi[2] hi[3]

-
  1. hi
+
  1. hi
!! end ### @@ -15139,8 +15176,8 @@ Image caption with pipe entity
one | two
one two | three
!! html/parsoid -
one | two
-
one two | three
+
one | two
+
one two | three
!! end !! test @@ -15155,9 +15192,9 @@ thumbsize=220 !! html/php
Caption Link1 [[]] Link2
!! html/parsoid -
Caption Link1 +
Caption Link1 [[]] -Link2 +Link2
!! end @@ -15211,7 +15248,7 @@ parsoid=wt2html,wt2wt,html2html !! html/php
This is a caption
!! html/parsoid -
This is a caption
+
This is a caption
!! end !! test @@ -15221,7 +15258,7 @@ parsoid=wt2html,wt2wt,html2html !! html/php
This is a caption
!! html/parsoid -
This is a caption
+
This is a caption
!! end !! test @@ -15232,7 +15269,7 @@ parsoid=wt2html,wt2wt,html2html

Foobar.jpg

!! html/parsoid -

+

!! end ## Parsoid does not provide editing support for images where templates produce multiple image attributes. @@ -15268,7 +15305,8 @@ thumbsize=220 !! html/parsoid

123456

123

456 -123

456

+123

+

456

!! end !! test @@ -15289,7 +15327,7 @@ Image with multiple widths -- use last

caption

!! html/parsoid -

+

!! end !! test @@ -15305,7 +15343,7 @@ thumbsize=220

caption

!! html/parsoid -
caption
+
caption

!! end @@ -15320,9 +15358,9 @@ Image with width attribute at different positions
Caption
Caption
!! html/parsoid -
Caption
-
Caption
-
Caption
+
Caption
+
Caption
+
Caption
!! end # a sad bit of backward-compatibility @@ -15338,7 +15376,7 @@ parsoid=wt2html,wt2wt,html2html Foobar.jpg

!! html/parsoid -

+

!! end !! test @@ -15480,7 +15518,7 @@ parsoid=wt2html,wt2wt,html2html !! html/php
Title
!! html/parsoid -
Title
+
Title
!! end !! test @@ -15607,7 +15645,7 @@ Alt image option should handle most kinds of wikitext without barfing !! html/php
This is a link and a bold template.
This is the image caption
!! html/parsoid -
This is a link and a bold template.
This is the image caption
+
This is a link and a bold template.
This is the image caption
!! end !! test @@ -15635,7 +15673,7 @@ File:Foobar.jpg|alt=& @@ -15670,7 +15708,10 @@ File:Foobar.jpg|alt=http://testing.123?4=5|6|caption !! end !! test @@ -15701,7 +15742,9 @@ File:Foobar.jpg|alt=''x''|caption !! end @@ -15769,9 +15812,8 @@ File:Foobar.jpg|alt=''x''|caption !! end @@ -15835,7 +15877,7 @@ File:Foobar.jpg|link=Foo_&_bar @@ -15890,11 +15932,11 @@ File:Foobar.jpg|link=''Main Page''|caption2 @@ -15964,7 +16006,7 @@ File:Foobar.jpg|link=Foo''s_bar''s|caption @@ -15995,7 +16037,7 @@ File:Foobar.jpg|link=https://example.com?foo¶ms=bar @@ -16013,7 +16055,7 @@ parsoid=wt2html,html2html |} ]] !! html/parsoid -
+
@@ -16030,7 +16072,7 @@ Image with table with rows from templates in caption |} ]] !! html/parsoid -
+
ha
hi
@@ -16049,7 +16091,7 @@ Image with nested tables in caption |} ]] !! html/parsoid -
Foo
+
Foo
@@ -16070,7 +16112,7 @@ Image with heading and horizontal rule in caption !! html/php

Testing[edit]

123
!! html/parsoid -
+

Testing

123
@@ -16098,9 +16140,9 @@ parsoid=wt2html,wt2wt,html2html

caption

!! html/parsoid -

-

-

+

+

+

!! end !! test @@ -16134,9 +16176,9 @@ parsoid=wt2html,wt2wt,html2html
caption
caption
!! html/parsoid -
caption
-
caption
-
caption
+
caption
+
caption
+
caption
!! end ################### @@ -16149,6 +16191,7 @@ parsoid=wt2html,wt2wt,html2html # 2. Framed images always ignore size options; always render at default size. # 3. "Unspecified format" and border are the only types which can be # enlarged. +# 4. The srcset attribute doesn't occur if image is being enlarged !! test Image: unspecified format and border enlarge @@ -16180,8 +16223,8 @@ parsoid=wt2html,wt2wt,html2html

Foobar.jpg

!! html/parsoid -

-

+

+

!! end !! test @@ -16193,7 +16236,7 @@ parsoid=wt2html,wt2wt,html2html !! html/php
Foobar.jpg
!! html/parsoid -
+
!! end !! test @@ -16209,7 +16252,7 @@ parsoid=wt2html,wt2wt,html2html
Foobar.svg
!! html/parsoid
-
+
!! end !! test @@ -16222,7 +16265,7 @@ parsoid=wt2html,wt2wt,html2html

Foobar.jpg

!! html/parsoid -

+

!! end !! test @@ -16239,7 +16282,7 @@ parsoid=wt2html,wt2wt,html2html

!! html/parsoid

-

+

!! end !! test @@ -16321,7 +16364,7 @@ thumbsize=220 !! html/php !! html/parsoid -
http://example.com
+
http://example.com
!! end !! test @@ -16334,7 +16377,7 @@ parsoid=wt2html,wt2wt,html2html !! html/php !! html/parsoid -
Alteration
http://example.com
+
Alteration
http://example.com
!! end !! test @@ -16345,7 +16388,7 @@ SVG thumbnails with no language set !! html/php
caption
!! html/parsoid -
caption
+
caption
!! end !! test @@ -16357,7 +16400,7 @@ parsoid=wt2html,wt2wt,html2html !! html/php
caption
!! html/parsoid -
caption
+
caption
!! end !! test @@ -16369,7 +16412,7 @@ parsoid=wt2html,wt2wt,html2html !! html/php
lang=invalid:language:code
!! html/parsoid -
lang=invalid:language:code
+
lang=invalid:language:code
!! end !! test @@ -16401,7 +16444,7 @@ T3887: A ISBN with a thumbnail !! html/php !! html/parsoid -
ISBN 1235467890
+
ISBN 1235467890
!! end !! test @@ -16411,7 +16454,7 @@ T3887: A RFC with a thumbnail !! html/php
This is RFC 12354
!! html/parsoid -
This is RFC 12354
+
This is RFC 12354
!! end !! test @@ -16421,7 +16464,7 @@ T3887: A mailto link with a thumbnail !! html/php !! html/parsoid -
Please mailto:nobody@example.com
+
Please mailto:nobody@example.com
!! end # Pending resolution to T2368 @@ -16543,7 +16586,7 @@ Image caption containing another image !! html/php
This is a caption with another image inside it!
!! html/parsoid -
This is a caption with another inside it!
+
This is a caption with another inside it!
!! end !! test @@ -16566,7 +16609,7 @@ Image: caption containing leading space !! html/php
bar
!! html/parsoid -
bar
+
bar
!!end # html/php output not have newlines after table, td, th, etc. because @@ -16588,7 +16631,7 @@ and some more text.]] !! html/php
This is an example image thumbnail caption with a table
Foo Bar
Foo1 Bar1
and some more text. !! html/parsoid -
This is an example image thumbnail caption with a table +
This is an example image thumbnail caption with a table @@ -16604,7 +16647,7 @@ T5090: External links other than http: in image captions !! html/php
This caption has irc and Secure ext links in it.
!! html/parsoid -
This caption has irc and Secure ext links in it.
+
This caption has irc and Secure ext links in it.
!! end !! test @@ -16644,7 +16687,7 @@ language=es !! html/php
caption
!! html/parsoid -
caption
+
caption
!! end !! test @@ -16669,7 +16712,7 @@ parsoid=wt2html,wt2wt,html2html

caption

!! html/parsoid -

+

!! end # Note that 'right' is the default alignment, despite the misspelled 'righ' below @@ -16689,9 +16732,9 @@ parsoid=wt2html,wt2wt,html2html
caption
caption
!! html/parsoid -
caption
-
caption
-
caption
+
caption
+
caption
+
caption
!! end !! article @@ -16737,7 +16780,7 @@ Parsoid-specific image handling - simple image with size and middle alignment !! wikitext [[File:Foobar.jpg|middle|50px]] !! html/parsoid -

+

!! end !! test @@ -16747,7 +16790,7 @@ parsoid=wt2wt,wt2html,html2html !! wikitext [[Image:Foobar.jpg|middle|50px]] !! html/parsoid -

+

!! end !! test @@ -16755,7 +16798,7 @@ Parsoid-specific image handling - simple image with size and middle alignment (e !! wikitext [[File:Foobar.jpg|50px|middle]] !! html/parsoid -

+

!! end !! test @@ -16765,7 +16808,7 @@ parsoid=wt2html,wt2wt,html2html !! wikitext [[Image:Foobar.jpg|50px|middle]] !! html/parsoid -

+

!! end !! test @@ -16773,7 +16816,7 @@ Parsoid-specific image handling - simple image with both sizes, a baseline align !! wikitext [[File:Foobar.jpg|500x10px|baseline|caption]] !! html/parsoid -

+

!! end !! test @@ -16781,7 +16824,7 @@ Parsoid-specific image handling - simple image with border and size spec !! wikitext [[File:Foobar.jpg|50px|border|caption]] !! html/parsoid -

+

!! end !! test @@ -16791,7 +16834,7 @@ parsoid=wt2html,html2html !! wikitext [[File:Foobar.jpg|left|baseline|thumb|caption content]] !! html/parsoid -
caption content
+
caption content
!! end !! test @@ -16801,7 +16844,7 @@ parsoid=wt2html,html2html !! wikitext [[File:Foobar.jpg|thumb|left|baseline|caption content]] !! html/parsoid -
caption content
+
caption content
!! end !! test @@ -16811,7 +16854,7 @@ parsoid=wt2html,html2html !! wikitext [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]] !! html/parsoid -
caption
+
caption
!! end !! test @@ -16821,7 +16864,7 @@ parsoid=wt2html,html2html !! wikitext [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]] !! html/parsoid -
caption
+
caption
!! end !! test @@ -16849,7 +16892,7 @@ Parsoid-specific image handling - frameless image with specific size, border, an !! wikitext [[File:Foobar.jpg|frameless|442x50px|border|caption]] !! html/parsoid -

+

!! end !! test @@ -16865,7 +16908,7 @@ Parsoid-specific image handling - caption with a template in it !! wikitext [[File:Foobar.jpg|thumb|200x23px|This caption has a {{1x|transclusion}} in it.]] !! html/parsoid -
This caption has a transclusion in it.
+
This caption has a transclusion in it.
!! end !! test @@ -16878,7 +16921,7 @@ foo bar !! html/parsoid

foo

-
This caption has a
unbalanced tag in it.
+
This caption has a
unbalanced tag in it.

bar

!! end @@ -16889,7 +16932,7 @@ 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 @@ -16916,7 +16959,7 @@ Parsoid-specific image handling - whitespace caption !! wikitext [[File:Foobar.jpg|thumb| ]] !! html/parsoid -
+
!! end !! test @@ -16939,7 +16982,7 @@ T93580: 1. Templated inside block images !! html/parsoid -
Caption with templated ref: [1]
+
Caption with templated ref: [1]
  1. foo
!! end @@ -17602,8 +17645,8 @@ Parsoid: Serialize link to category page with colon escape

!! html/parsoid

-Category:Foo -Bar +Category:Foo +Bar

!! end @@ -17657,8 +17700,8 @@ Parsoid: Serialize link to file page with colon escape

!! html/parsoid

-File:Foo.png -Bar +File:Foo.png +Bar

!! end @@ -18950,7 +18993,7 @@ Image link to nonexistent file (T3850 - good)

Image:No such.jpg

!! html/parsoid -

Image:No such.jpg

+

Image:No such.jpg

!! end !! test @@ -18970,6 +19013,7 @@ Test for unicode normalization The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E !! endarticle +# Parsoid has a regression here (T258858) note the incorrect redlink as well !! test (T21451) Links should refer to the normalized form. !! wikitext @@ -18978,13 +19022,19 @@ The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E [[אַ]] [[אַ]] [[אַ]] -!! html +!! html/php

אַ אַ אַ אַ

+!! html/parsoid +

+אַ +אַ +אַ +אַ

!! end !! test @@ -21757,9 +21807,9 @@ image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
  • Foo Main Page
  • caption
  • -
  • some caption Main Page
  • -
  • -
  • This is a foo-bar.
    blabla.
  • +
  • some caption Main Page
  • +
  • +
  • This is a foo-bar.
    blabla.
  • !! end @@ -21839,7 +21889,7 @@ File:Foobar.jpg !! html/parsoid !! end @@ -21859,7 +21909,7 @@ File:Foobar.jpg !! html/parsoid !! end @@ -21897,9 +21947,9 @@ image:foobar.jpg|link=Main Page#section|caption !! html/parsoid !! end @@ -21923,7 +21973,7 @@ File:Foobar.jpg|{{1x|ho}} !! html/parsoid !! end @@ -21954,8 +22004,8 @@ File:Foobar.jpg|Image caption !! html/parsoid !! end @@ -21985,8 +22035,8 @@ File:Foobar.jpg|alt=galleryalt|{{Test|unamedParam|alt=param}} !! html/parsoid !! end @@ -22010,7 +22060,7 @@ File:Foobar.jpg|
    !! html/parsoid !! end @@ -22060,8 +22110,8 @@ some captionMain Page !! end @@ -22106,8 +22156,8 @@ foobar.jpg !! end @@ -22127,7 +22177,7 @@ File:Foobar.jpg|alt=galleryalt|link=Wikilink !! html/parsoid !! end @@ -22147,7 +22197,7 @@ File:Foobar.jpg|alt=galleryalt|link=http://www.example.org !! html/parsoid !! end @@ -22174,7 +22224,7 @@ File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org !! html/parsoid !! end @@ -22198,7 +22248,7 @@ File:Foobar.jpg|alt=galleryalt|link=" onclick="alert('malicious javascript code! !! html/parsoid !! end @@ -22222,7 +22272,7 @@ File:Foobar.jpg|link=< !! html/parsoid !! end @@ -22259,7 +22309,7 @@ File:Foobar.jpg !! html/parsoid !! end @@ -22283,7 +22333,7 @@ File:Foobar.jpg|foo !! html/parsoid !! end @@ -22303,7 +22353,7 @@ File:Foobar.jpg !! html/parsoid !! end @@ -22323,7 +22373,7 @@ File:Foobar.jpg !! html/parsoid !! end @@ -22347,7 +22397,7 @@ File:Foobar.jpg|foo !! html/parsoid !! end @@ -22371,7 +22421,7 @@ File:Foobar.jpg|foo !! html/parsoid !! end @@ -22574,7 +22624,7 @@ RFC [[RFC 1234]]

    RFC RFC 1234

    !! html/parsoid -

    RFC RFC 1234

    +

    RFC RFC 1234

    !! end !! test @@ -22616,7 +22666,7 @@ Width + Height sized image (using px) (height is ignored)

    Foobar.jpg

    !! html/parsoid -

    +

    !! end !! test @@ -22627,7 +22677,7 @@ Width-sized image (using px, no following whitespace)

    Foobar.jpg

    !! html/parsoid -

    +

    !! end !! test @@ -22638,8 +22688,8 @@ Width-sized image (using px, with following whitespace - test regression from r3

    Foobar.jpg

    !! html/parsoid -

    -!!end +

    +!! end !! test Width-sized image (using px, with preceding whitespace - test regression from r39467) @@ -22649,21 +22699,80 @@ Width-sized image (using px, with preceding whitespace - test regression from r3

    Foobar.jpg

    !! html/parsoid -

    +

    !! end -## FIXME: Parsoid mocking should include the page in the url to catch regressions !! test Image with page parameter !! options djvu !! wikitext +[[File:LoremIpsum.djvu]] + [[File:LoremIpsum.djvu|page=2]] !! html/php +

    LoremIpsum.djvu +

    LoremIpsum.djvu +

    +!! html/parsoid +

    +

    +!! end + +!! test +Image with page parameter generated by a template +!! options +djvu +!! wikitext +[[File:LoremIpsum.djvu|page={{1x|2}}]] +!! html/php

    LoremIpsum.djvu

    !! html/parsoid -

    +

    +!! end + +!! test +Image with modified page parameter; serialize href query not data-mw +!! options +djvu +parsoid={ + "modes": ["wt2wt", "selser"], + "changes": [ + ["a[href]", "attr", "href", "./File:LoremIpsum.djvu?page=3"] + ] +} +!! wikitext +[[File:LoremIpsum.djvu|page 2]] + +[[File:LoremIpsum.djvu|page {{1x|2}}]] +!! wikitext/edited +[[File:LoremIpsum.djvu|page 3]] + +[[File:LoremIpsum.djvu|page 3]] +!! end + +# This tests for RESTBase content backward-compatibility; +# the output should change when T259931 has been resolved (the page +# parameter should be removed in the wikitext/edited section) +!! test +Image with modified page parameter; serialize href query not data-mw (2) +!! options +djvu +parsoid={ + "modes": ["wt2wt", "selser"], + "changes": [ + ["a[href]", "attr", "href", "./File:LoremIpsum.djvu"] + ] +} +!! wikitext +[[File:LoremIpsum.djvu|page 2]] + +[[File:LoremIpsum.djvu|page {{1x|2}}]] +!! wikitext/edited +[[File:LoremIpsum.djvu|page 2]] + +[[File:LoremIpsum.djvu|page {{1x|2}}]] !! end !! test @@ -22691,7 +22800,7 @@ Images with the "|" character in the comment !! html/php
    An external URL
    !! html/parsoid -
    An external URL
    +
    An external URL
    !! end !! test @@ -22722,9 +22831,11 @@ Parents of subpages, one level up subpage title=[[Subpage test/L1/L2/L3]] !! wikitext [[../|L2]] -!! html +!! html/php

    L2

    +!! html/parsoid +

    L2

    !! end @@ -22734,9 +22845,11 @@ Parents of subpages, one level up, not named subpage title=[[Subpage test/L1/L2/L3]] !! wikitext [[../]] -!! html +!! html/php

    Subpage test/L1/L2

    +!! html/parsoid +

    Subpage_test/L1/L2

    !! end @@ -22749,10 +22862,14 @@ subpage title=[[Subpage test/L1/L2/L3]] [[../../|L1]]2 [[../../|L1]]l -!! html +!! html/php

    L12

    L1l

    +!! html/parsoid +

    L12

    + +

    L1l

    !! end !! test @@ -22772,9 +22889,11 @@ Parents of subpages, two levels up, with lots of extra trailing slashes. subpage title=[[Subpage test/L1/L2/L3]] !! wikitext [[../../////]] -!! html +!! html/php

    Subpage test/L1

    +!! html/parsoid +

    Subpage_test/L1

    !! end !! article @@ -23176,7 +23295,7 @@ Both [[Dunav]] and [[Дунав]] are names for this river.

    Both Dunav and Дунав are names for this river.

    !! html/parsoid -

    Both Dunav and Дунав are names for this river.

    +

    Both Dunav and Дунав are names for this river.

    !! end !! article @@ -23185,6 +23304,7 @@ Both [[Dunav]] and [[Дунав]] are names for this river. content !! endarticle +# T258856: Parsoid doesn't handle redlink processing correctly in this case !! test Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title !! options @@ -23195,9 +23315,10 @@ title=[[Duna]] language=sr

    Дуна is not a self-link while Duna and Dуна are still self-links.

    !! html/parsoid -

    Дуна is not a self-link while Duna and Dуна are still self-links.

    +

    Дуна is not a self-link while Duna and Dуна are still self-links.

    !! end +# T258856: Parsoid doesn't handle redlink processing correctly in this case !! test Link to a section of a variant of this title shouldn't be parsed as self-link !! options @@ -23208,9 +23329,10 @@ title=[[Duna]] language=sr

    Dуна is a self-link while Dunа#Foo and Dуна#Foo are not self-links.

    !! html/parsoid -

    Dуна is a self-link while Dunа#Foo and Dуна#Foo are not self-links.

    +

    Dуна is a self-link while Dunа#Foo and Dуна#Foo are not self-links.

    !! end +# T258856: Parsoid doesn't handle redlink processing correctly in this case !! test Link to pages in language variants !! options @@ -23221,10 +23343,11 @@ Main Page can be written as [[Маин Паге]]

    Main Page can be written as Маин Паге

    !! html/parsoid -

    Main Page can be written as Маин Паге

    +

    Main Page can be written as Маин Паге

    !! end +# T258856: Parsoid doesn't handle redlink processing correctly in this case !! test Multiple links to pages in language variants !! options @@ -23235,7 +23358,7 @@ language=sr

    Main Page can be written as Маин Паге same as Маин Паге.

    !! html/parsoid -

    Main Page can be written as Маин Паге same as Маин Паге.

    +

    Main Page can be written as Маин Паге same as Маин Паге.

    !! end @@ -23313,7 +23436,7 @@ parsoid=wt2html !! html/php cat=分类 sort= !! html/parsoid -

    A

    +

    A

    !! end @@ -24172,7 +24295,7 @@ language=sr !! html/php
    caption:
    !! html/parsoid -
    +
    !! end !! test @@ -24184,7 +24307,7 @@ language=zh variant=zh-cn !! html/php
    blog (hk: WEBJOURNAL, tw: WEBLOG)
    !! html/parsoid -
    +
    !! end # XXX html2wt disabled because rich markup in alt is not preserved. @@ -24217,8 +24340,8 @@ File:Foobar.jpg|alt=galleryalt|{{Test|unamedParam|alt=-{R|param}-}} !! html/parsoid !! end @@ -24805,7 +24928,7 @@ Free external link invading image caption !! html/php
    hello
    !! html/parsoid -
    hello
    +
    hello
    !! end !! test @@ -25501,10 +25624,10 @@ percent-encoding and + signs in internal links (T28410) 3E3E+

    !! html/parsoid -

    User:+% Page+title% -%+ %20 %+ %+r -% + File:%+abc9 -3E 3E+

    +

    User:+% Page+title% +%+ %20 %+ %+r +% + File:%+abc9 +3E 3E+

    !! end !! test @@ -26339,9 +26462,9 @@ parsoid=wt2html,wt2wt

    foo

    caption

    bar

    Foobar.jpg
    !! html/parsoid -

    foo

    caption

    bar

    +

    foo

    caption

    bar

    -
    +
    !! end !! test @@ -26353,7 +26476,7 @@ parsoid=wt2html,wt2wt !! html/php+tidy

    foo

    caption

    bar

    !! html/parsoid -

    foo

    caption

    bar

    +

    foo

    caption

    bar

    !! end !! test @@ -26365,7 +26488,7 @@ parsoid=wt2html,wt2wt !! html/php+tidy
    Foobar.jpg
    !! html/parsoid -
    +
    !! end ## Just a regression test @@ -26376,7 +26499,7 @@ parsoid=wt2html !! wikitext [[Test|]] !! html/parsoid -

    +

    !! end #### ---------------------------------------------------------------- @@ -27828,7 +27951,7 @@ Nominated–[[Nineteentwentythree]]

    Nominated–Nineteentwentythree

    !! html/parsoid -

    Nominated–Nineteentwentythree

    +

    Nominated–Nineteentwentythree

    !! end # This example actually from lnwiki, but arwiki has the same link @@ -27845,8 +27968,8 @@ language=ar Pusupúsu ·

    !! html/parsoid -

    Likalo · -Pusupúsu ·

    +

    Likalo · +Pusupúsu ·

    !! end #### --------------- Quotes --------------- @@ -28719,9 +28842,9 @@ Multi-line image caption generated by templates with/without trailing newlines [[File:Foobar.jpg|thumb|300x300px|foo\n{{1x|A}}\n{{1x|B}}\n{{1x|C}}]] [[File:Foobar.jpg|thumb|300x300px|foo\n{{1x|A}}\n{{1x|B}}\n{{1x|C}}\n\n]] !! html/parsoid -
    foo\nA\nB\nC
    -
    foo\nA\nB\nC\n\n
    -!!end +
    foo\nA\nB\nC
    +
    foo\nA\nB\nC\n\n
    +!! end !! test New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly @@ -29392,7 +29515,7 @@ Image: empty alt attribute (T50924) !! html/php+tidy
    bar
    !! html/parsoid -
    bar
    +
    bar
    !! end !! test @@ -29415,7 +29538,7 @@ Image: Block level image should have \n before and after 456 !! html/parsoid

    123

    -
    +

    456

    !! end @@ -29427,7 +29550,7 @@ Image: New block level image should have \n before and after (existing content) 456 !! html/parsoid

    123

    -
    +

    456

    !! end @@ -29438,9 +29561,9 @@ Image: upright option (parsoid) [[File:Foobar.jpg|thumb|upright=0.5|caption]] [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]] !! html/parsoid -
    caption
    -
    caption
    -
    caption
    +
    caption
    +
    caption
    +
    caption
    !! end !! test @@ -29448,7 +29571,7 @@ Image: upright option is ignored on inline and frame images (parsoid) !! wikitext [[File:Foobar.jpg|500x500px|upright=0.5|caption]] !! html/parsoid -

    +

    !! end !! test @@ -30464,10 +30587,10 @@ Magic links inside image captions (autolinked) !! html/parsoid -
    http://example.com
    -
    RFC 1234
    -
    PMID 1234
    -
    ISBN 123456789x
    +
    http://example.com
    +
    RFC 1234
    +
    PMID 1234
    +
    ISBN 123456789x
    !! end !! test @@ -30479,7 +30602,7 @@ language=de !! html+tidy !! html/parsoid -
    Wikipedia:Foo bar
    +
    Wikipedia:Foo bar
    !! end !! test @@ -30906,7 +31029,7 @@ parsoid=wt2html !! wikitext {{1x|hi}}[http://example.com [[ho]]] !! html/parsoid -

    hiho

    +

    hiho

    !! end !! test @@ -30983,7 +31106,7 @@ parsoid={ !! html/parsoid

    -
    123
    +
    123
    !! end # -------------------------------------------- @@ -32605,800 +32728,6 @@ wgFragmentMode=[ 'html5' ] !! html/parsoid

    #[foo]

    !! end - -## ------------------------------ -## Parsoid section-wrapping tests -## ------------------------------ -!! test -Section wrapping for well-nested sections (no leading content) -!! options -notoc -parsoid={ - "wrapSections": true -} -!! wikitext -=1= -a - -=2= -b - -==2.1== -c - -==2.2== -d - -===2.2.1=== -e - -=3= -f -!! html/php+tidy - -

    1[edit]

    -

    a -

    -

    2[edit]

    -

    b -

    -

    2.1[edit]

    -

    c -

    -

    2.2[edit]

    -

    d -

    -

    2.2.1[edit]

    -

    e -

    -

    3[edit]

    -

    f -

    -!! html/parsoid -

    1

    -

    a

    - -

    2

    -

    b

    - -

    2.1

    -

    c

    - -

    2.2

    -

    d

    - -

    2.2.1

    -

    e

    - -

    3

    -

    f

    - -
    -!! end - -!! test -Section wrapping for well-nested sections (with leading content) -!! options -notoc -parsoid={ - "wrapSections": true -} -!! wikitext -Para 1. - -Para 2 with a
    nested in it
    - -Para 3. - -=1= -a - -=2= -b - -==2.1== -c -!! html/php+tidy -

    Para 1. -

    -Para 2 with a

    nested in it
    -

    Para 3. -

    -

    1[edit]

    -

    a -

    -

    2[edit]

    -

    b -

    -

    2.1[edit]

    -

    c -

    -!! html/parsoid -

    Para 1.

    - -

    Para 2 with a

    nested in it
    - -

    Para 3.

    - -

    1

    -

    a

    - -

    2

    -

    b

    - -

    2.1

    -

    c

    - -
    -!! end - -!! test -Section wrapping with template-generated sections (good nesting 1) -!! options -notoc -parsoid={ - "wrapSections": true -} -!! wikitext -=1= -a - -{{1x|1= -==1.1== -b -}} -==1.2== -c - -=2= -d -!! html/php+tidy - -

    1[edit]

    -

    a -

    -

    1.1

    -

    b -

    -

    1.2[edit]

    -

    c -

    -

    2[edit]

    -

    d -

    -!! html/parsoid -

    1

    -

    a

    - -

    1.1

    -

    b

    -

    1.2

    -

    c

    - -

    2

    -

    d

    -!! end - -# In this example, the template scope is mildly expanded to incorporate the -# trailing newline after the transclusion since that is part of section 1.1.1 -!! test -Section wrapping with template-generated sections (good nesting 2) -!! options -notoc -parsoid={ - "wrapSections": true, - "modes": ["wt2html", "wt2wt"] -} -!! wikitext -=1= -a - -{{1x|1= -==1.1== -b -===1.1.1=== -d -}} -=2= -e -!! html/php+tidy - -

    1[edit]

    -

    a -

    -

    1.1

    -

    b -

    -

    1.1.1

    -

    d -

    -

    2[edit]

    -

    e -

    -!! html/parsoid -

    1

    -

    a

    - -

    1.1

    -

    b

    -

    1.1.1

    -

    d

    -

    2

    -

    e

    -!! end - -# In this example, the template scope is mildly expanded to incorporate the -# trailing newline after the transclusion since that is part of section 1.2.1 -!! test -Section wrapping with template-generated sections (good nesting 3) -!! options -notoc -parsoid={ - "wrapSections": true, - "modes": ["wt2html", "wt2wt"] -} -!! wikitext -=1= -a - -{{1x|1= -x -==1.1== -b -==1.2== -c -===1.2.1=== -d -}} -=2= -e -!! html/php+tidy - -

    1[edit]

    -

    a -

    x -

    -

    1.1

    -

    b -

    -

    1.2

    -

    c -

    -

    1.2.1

    -

    d -

    -

    2[edit]

    -

    e -

    -!! html/parsoid -

    1

    -

    a

    - -

    x

    -

    1.1

    -

    b

    -

    1.2

    -

    c

    -

    1.2.1

    -

    d

    -

    2

    -

    e

    -!! end - -# Because of section-wrapping and template-wrapping interactions, -# the scope of the template is expanded so that the template markup -# is valid in the presence of
    tags. -# This exercises the s1 is null scenario in the wrapSections code -!! test -Section wrapping with template-generated sections (bad nesting 1) -!! options -notoc -parsoid={ - "wrapSections": true -} -!! wikitext -
    -a - -{{1x|1= -=1= -b -}} - -c -
    -!! html/php+tidy -
    -

    a -

    -

    1

    -

    b -

    c -

    -
    -!! html/parsoid -
    -

    a

    - -

    1

    -

    b

    - -

    c

    -
    -!! end - -# Because of section-wrapping and template-wrapping interactions, -# the scope of the template is expanded so that the template markup -# is valid in the presence of
    tags. -# This exercises the s1 is ancestor of s2 scenario in the wrapSections code -!! test -Section wrapping with template-generated sections (bad nesting 2) -!! options -notoc -parsoid={ - "wrapSections": true -} -!! wikitext -=1= -a - -{{1x|1= -=2= -b -==2.1== -c -}} - -d - -=3= -e -!! html/php+tidy - -

    1[edit]

    -

    a -

    -

    2

    -

    b -

    -

    2.1

    -

    c -

    d -

    -

    3[edit]

    -

    e -

    -!! html/parsoid -

    1

    -

    a

    - -

    2

    -

    b

    -

    2.1

    -

    c

    - -

    d

    - -

    3

    -

    e

    -!! end - -# Because of section-wrapping and template-wrapping interactions, -# additional template wrappers are added to
    tags -# so that template wrapping semantics are valid whether section -# tags are retained or stripped. But, the template scope can expand -# greatly when accounting for section tags. -# This exercises the s1 and s2 are in different subtrees scenario -!! test -Section wrapping with template-generated sections (bad nesting 3) -!! options -notoc -parsoid={ - "wrapSections": true, - "modes": ["wt2html", "wt2wt"] -} -!! wikitext -=1= -a - -{{1x|1= -==1.2== -b -=2= -c -}} - -d - -=3= -e -!! html/php+tidy - -

    1[edit]

    -

    a -

    -

    1.2

    -

    b -

    -

    2

    -

    c -

    d -

    -

    3[edit]

    -

    e -

    -!! html/parsoid -

    1

    -

    a

    - -

    1.2

    -

    b

    -

    2

    -

    c

    - -

    d

    -

    3

    -

    e

    -!! end - -!! test -Section wrapping with uneditable lead section + div wrapping multiple sections -!! options -notoc -parsoid={ - "wrapSections": true -} -!! wikitext -foo - -
    -=1= -a - -==1.1== -b - -=2= -c -
    - -=3= -d - -==3.1== -e -!! html/php+tidy -

    foo -

    -
    - -

    1[edit]

    -

    a -

    -

    1.1[edit]

    -

    b -

    -

    2[edit]

    -

    c -

    -
    -

    3[edit]

    -

    d -

    -

    3.1[edit]

    -

    e -

    -!! html/parsoid -

    foo

    - -
    -

    1

    -

    a

    - -

    1.1

    -

    b

    - -

    2

    -

    c

    -
    - -

    3

    -

    d

    - -

    3.1

    -

    e

    -
    -!! end - -!! test -Section wrapping with editable lead section + div overlapping multiple sections -!! options -notoc -parsoid={ - "wrapSections": true -} -!! wikitext -foo - -=1= -a -
    -b - -==1.1== -c - -=2= -d -
    -e - -=3= -f - -==3.1== -g -!! html/php+tidy -

    foo -

    - -

    1[edit]

    -

    a -

    -
    -

    b -

    -

    1.1[edit]

    -

    c -

    -

    2[edit]

    -

    d -

    -
    -

    e -

    -

    3[edit]

    -

    f -

    -

    3.1[edit]

    -

    g -

    -!! html/parsoid -

    foo

    - -

    1

    -

    a

    -
    -

    b

    - -

    1.1

    -

    c

    - -

    2

    -

    d

    -
    -

    e

    - -

    3

    -

    f

    - -

    3.1

    -

    g

    -
    -!! end - -!! test -HTML header tags should not be wrapped in section tags -!! options -notoc -parsoid={ - "wrapSections": true -} -!! wikitext -foo - -

    a

    - -=b= - -

    c

    - -=d= -!! html/php+tidy -

    foo -

    - -

    a

    -

    b[edit]

    -

    c

    -

    d[edit]

    -!! html/parsoid -

    foo

    - -

    a

    - -

    b

    - -

    c

    - -

    d

    -!! end - -!! test -Lead section containing only whitespace and comments. -!! options -notoc -parsoid={ - "wrapSections": true -} -!! wikitext - - -=1= -a - -=2= -b -!! html/php+tidy -

    1[edit]

    -

    a -

    -

    2[edit]

    -

    b -

    -!! html/parsoid -
    - -

    1

    -

    a

    - -

    2

    -

    b

    -
    -!! end - -!! test -Pseudo-sections emitted by templates should have id -2 -!! options -notoc -parsoid={ - "wrapSections": true -} -!! wikitext -foo -{{1x|
    -==a== -==b== -
    -}} -!! html/php+tidy -

    foo -

    -
    -

    a

    -

    b

    -
    -!! html/parsoid -

    foo

    -
    -

    a

    -

    b

    -
    -
    -!! end - -!! test -T213468: Transcluded sections don't get PHP section numbers -!! options -notoc -parsoid={ - "wrapSections": true -} -!! wikitext -==PHP section=1== -{{1x|1= -== This is counted as if it were section 2 == -}} -==PHP section=3== -!! html/php+tidy -

    PHP section=1[edit]

    -

    This is counted as if it were section 2

    -

    PHP section=3[edit]

    -!! html/parsoid -

    PHP section=1

    -

    This is counted as if it were section 2

    -

    PHP section=3

    -!! end - -!! test -T213468: Corner cases in edit section ID assignment in tokenizer -!! options -notoc -parsoid={ - "wrapSections": true -} -!! wikitext -==PHP section=1== -{{1x|Not a section| -== This is counted as if it were section 2 == -}} -==PHP section=3== -{{3x_on_newline|1= -== This is counted as if it were section 4 == -}} -==PHP section=5== -{{#tag:p|Not a section|data-ignored= -== This is counted as if it were section 6 == -}} -==PHP section=7== -{{1x|1=Not a ==heading==}} -==PHP section=8== -[[File:Foobar.jpg|thumb| -==This is section 9, even though it's in a caption== -]] -==PHP section=10== -!! html/php+tidy - -

    PHP section=1[edit]

    -

    Not a section -

    -

    PHP section=3[edit]

    -

    This is counted as if it were section 4

    -

    This is counted as if it were section 4

    -

    This is counted as if it were section 4

    -

    PHP section=5[edit]

    -

    Not a section

    -

    PHP section=7[edit]

    -

    Not a ==heading== -

    -

    PHP section=8[edit]

    -

    This is section 9, even though it's in a caption[edit]

    -

    PHP section=10[edit]

    -!! html/parsoid -

    PHP section=1

    -

    Not a section

    -

    PHP section=3

    -

    This is counted as if it were section 4

    -

    This is counted as if it were section 4

    -

    This is counted as if it were section 4

    -

    PHP section=5

    -

    Not a section

    -

    PHP section=7

    -

    Not a ==heading==

    -

    PHP section=8

    -
    -

    This is section 9, even though it's in a caption

    -
    -

    PHP section=10

    -!! end - -!! test -T215628: Section numbering and and on a page -!! options -notoc -parsoid={ - "wrapSections": true -} -!! wikitext -==PHP section=1== - -==PHP section=2== - -==PHP section=3== - -==This is not counted as section 4== - -==PHP section=4== -!! html/php+tidy - -

    PHP section=1[edit]

    -

    PHP section=2[edit]

    -

    PHP section=3[edit]

    -

    PHP section=4[edit]

    -!! html/parsoid -PARSOID HAS A BUG HERE: T215628 -!! end - ########################################################################## # Tests demonstrating white-space insensitivity in input wikitext # for wikitext headings, wikitext list items, and wikitext table captions, @@ -33478,7 +32807,7 @@ __NOTOC__
    - +
    FooBar
    class="foo"Table Cell 3
    testing two | some content
    testing two | some content
    Table Cell 1Table Cell 2