X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fparser%2FparserTests.txt;h=451c50f5a8d879cc91a7561ba3e8030cbd30b8be;hb=021ed39d59b3a2edcaea70edb03778eb0bdc36d4;hp=f98044b57c098ee79e3db86c9b9cbe5abc2fe61a;hpb=0821bea5a63f4e500fdee4844c79daa31f3de00d;p=lhc%2Fweb%2Fwiklou.git
diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt
index f98044b57c..451c50f5a8 100644
--- a/tests/parser/parserTests.txt
+++ b/tests/parser/parserTests.txt
@@ -534,8 +534,8 @@ parsoid=wt2html
!! config
wgFragmentMode=[ 'html5', 'legacy' ]
!! wikitext
-== A
bar baz quux
+!! end !! test @@ -2300,7 +2306,7 @@ T17491: /Foo
+barbaz quux +
Foo
barbazquux +
!! end @@ -2751,7 +2757,7 @@ Templates: Strip leading and trailing whitespace from named-param valuesFoo
barbaz quuxb
c
-+
- d
!! end @@ -2772,7 +2778,7 @@ Templates: Don't strip whitespace from positional-param values e}} {{echo| -* f}} +*f}} {{echo| }}g @@ -2792,7 +2798,7 @@ Templates: Don't strip whitespace from positional-param values
- d
-
+
- f
- f
g @@ -3168,15 +3174,15 @@ c 2c. Indent-Pre and tables (T44252) !! wikitext {| - |+ foo - ! | bar + |+foo + ! |bar |} !! html-
!!end @@ -3186,14 +3192,14 @@ c !! wikitext a {| - | b + |b |} !! html/phpfoo + foo - bar + bar a!! html/parsoid @@ -3699,19 +3705,19 @@ HTML-pre: 3: other wikitext !! test Simple definition !! wikitext -; name : Definition +;name :Definition !! html -
- b + b +
- name
-- Definition
!! end !! test Definition list for indentation only !! wikitext -: Indented text +:Indented text !! html -
- name
+- Definition
+
- Indented text
!! end @@ -3728,10 +3734,10 @@ Definition list with no space !! test Definition list with URL link !! wikitext -; http://example.com/ : definition +;http://example.com/ :definition !! html -
- Indented text
+
- http://example.com/
-- definition
!! end @@ -3748,10 +3754,10 @@ Definition list with bracketed URL link !! test Definition list with wikilink containing colon !! wikitext -; [[Help:FAQ]]: The least-read page on Wikipedia +; [[Help:FAQ]]:The least-read page on Wikipedia !! html -
- http://example.com/
+- definition
+
- Help:FAQ
-- The least-read page on Wikipedia
!! end @@ -3759,13 +3765,13 @@ Definition list with wikilink containing colon !! test Definition list with news link containing colon !! wikitext -; news:alt.wikipedia.rox: This isn't even a real newsgroup! +;news:alt.wikipedia.rox: This isn't even a real newsgroup! !! html/php -
- Help:FAQ
+- The least-read page on Wikipedia
+
- news:alt.wikipedia.rox
-- This isn't even a real newsgroup!
!! html/parsoid -
- news:alt.wikipedia.rox
+- This isn't even a real newsgroup!
+
- news:alt.wikipedia.rox
- This isn't even a real newsgroup!
!! end !! test @@ -3773,17 +3779,17 @@ Malformed definition list with colon !! wikitext ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop !! html -
- news:alt.wikipedia.rox
- This isn't even a real newsgroup!
+
- news:alt.wikipedia.rox -- don't crash or enter an infinite loop
!! end !! test Definition lists: colon in external link text !! wikitext -; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up +;[http://www.wikipedia2.org/ Wikipedia :The Next Generation] :OK, I made that up !! html -
- news:alt.wikipedia.rox -- don't crash or enter an infinite loop
+
- Wikipedia : The Next Generation
-- OK, I made that up
!! end @@ -3799,30 +3805,30 @@ Definition lists: colon in HTML attribute !! test Definition lists: self-closed tag !! wikitext -;one
- Wikipedia :The Next Generation
+- OK, I made that up
two : two-line fun +;one
two :two-line fun !! html+
- one
-
two- two-line fun
two-line fun !! end !! test Definition lists: ignore colons inside tags !! wikitext -;one two : tag fun::: def +;one two : tag fun:::def !! html+
- one two : tag fun::
-- def
def !! end !! test Definition lists: excess closed tags !! wikitext -;onetwo : bad tag fun +;onetwo :bad tag fun !! html/php+tidy+
- onetwo
-- bad tag fun
bad tag fun !! html/parsoid!! end @@ -4265,11 +4297,11 @@ Definition Lists: Mixed Lists: Test 6 !! test Definition Lists: Mixed Lists: Test 7 !! wikitext -:* d1 -:* d2 +:*d1 +:*d2 !! html -
- onetwo
@@ -3853,14 +3859,14 @@ T13748: Literal closing tags Definition and unordered list using wiki syntax nested in unordered list using html tags. !! wikitext!! html
- -; term : description -* unordered +;term :description +*unordered
!! end @@ -3868,10 +3874,11 @@ Definition and unordered list using wiki syntax nested in unordered list using h !! test Definition list with empty definition and following paragraph !! wikitext -; term: +;term: + Paragraph text !! html -
- -
-
- term
-- description
+
- unordered
+
- term
+- description
- unordered
!! end @@ -4254,10 +4286,10 @@ Definition Lists: Mixed Lists: Test 5 Definition Lists: Mixed Lists: Test 6 !! wikitext #*:d1 -#*::: d3 +#*:::d3 !! html
- term
+
- term
Paragraph text
@@ -3957,6 +3964,29 @@ should be left alone !! end +!! test +Definition Lists: Hacky use to indent tables (with content following table) +!! wikitext +:{| +|foo +|bar +|} this text should be part of the dl +!! html/php+tidy ++!! html/parsoid +
+
this text should be part of the dl+ foo + +bar + +!! end + !! test Definition Lists: Hacky use to indent tables, with comments (T65979) !! wikitext @@ -4049,22 +4079,24 @@ Table / list interaction: indented table with lists in table contents !! wikitext :{| |- -| a -* b +|a + +*b |- -| c -* d +|c + +*d |} !! html
+
this text should be part of the dl+ foo + +bar + !! end @@ -4172,30 +4204,30 @@ Definition Lists: Nesting: Test 4 !! test Definition Lists: Mixed Lists: Test 1 !! wikitext -:;* foo -::* bar -:; baz +:;*foo +::*bar +:;baz !! html/php -
- a - +
- b
a +
- b
- c - +
- d
c +
- d
+
-
- foo
-- bar
- baz
!! html/php+tidy -
+
- foo
+- bar
- baz
+
-
- foo
-- bar
- baz
!! html/parsoid
+
- foo
+- bar
- baz
!! end @@ -4203,11 +4235,11 @@ Definition Lists: Mixed Lists: Test 1 !! test Definition Lists: Mixed Lists: Test 2 !! wikitext -*: d1 -*: d2 +*:d1 +*:d2 !! html -
-
- foo +
- foo
- -
-
- bar +
- bar
- baz
+- baz
+
- d1
-- d2
!! end @@ -4215,11 +4247,11 @@ Definition Lists: Mixed Lists: Test 2 !! test Definition Lists: Mixed Lists: Test 3 !! wikitext -*::: d1 -*::: d2 +*:::d1 +*:::d2 !! html -
- d1
+- d2
+
- d1
-- d2
!! end @@ -4242,10 +4274,10 @@ Definition Lists: Mixed Lists: Test 4 Definition Lists: Mixed Lists: Test 5 !! wikitext *:d1 -*:: d2 +*::d2 !! html
- d1
+- d2
+
- d1 -
- d2
- d2
+
- d1 -
- d3
- d3
+
- d1
-- d2
!! end @@ -4277,11 +4309,11 @@ Definition Lists: Mixed Lists: Test 7 !! test Definition Lists: Mixed Lists: Test 8 !! wikitext -:* d1 -::* d2 +:*d1 +::*d2 !! html -
- d1
+- d2
+
-
- d1
- d2
!! end @@ -4382,10 +4414,10 @@ Definition Lists: Mixed Lists: Test 12 !! test Definition Lists: Weird Ones: Test 1 !! wikitext -*#;*::;; foo : bar (who uses this?) +*#;*::;;foo :bar (who uses this?) !! html/php+tidy -
+
- d1
- d2
+
- foo
-
- bar (who uses this?)
!! html/parsoid
- foo
+
- bar (who uses this?)
- @@ -4402,8 +4434,8 @@ Definition Lists: Weird Ones: Test 1
@@ -4460,29 +4492,29 @@ Definition Lists: colons occurring in tags Definition Lists: colons and tables 1 !! wikitext :{| -| x +|x |} :{| -| y +|y |} !! html/php
-
- fooÂ
-- bar (who uses this?)
+- fooÂ
+- bar (who uses this?)
- x + x !! html/parsoid
- y + y !! end @@ -5543,61 +5575,62 @@ IPv6 urls, autolink format (T23261) http://[2404:130:0:1000::187:2]/index.php Examples from RFC 2373, section 2.2: -* http://[1080::8:800:200C:417A]/unicast -* http://[FF01::101]/multicast -* http://[::1]/loopback -* http://[::]/unspecified -* http://[::13.1.68.3]/ipv4compat -* http://[::FFFF:129.144.52.38]/ipv4compat + +*http://[1080::8:800:200C:417A]/unicast +*http://[FF01::101]/multicast +*http://[::1]/loopback +*http://[::]/unspecified +*http://[::13.1.68.3]/ipv4compat +*http://[::FFFF:129.144.52.38]/ipv4compat Examples from RFC 2732, section 2: -* http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html -* http://[1080:0:0:0:8:800:200C:417A]/index.html -* http://[3ffe:2a00:100:7031::1] -* http://[1080::8:800:200C:417A]/foo -* http://[::192.9.5.5]/ipng -* http://[::FFFF:129.144.52.38]:80/index.html -* http://[2010:836B:4179::836B:4179] +*http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html +*http://[1080:0:0:0:8:800:200C:417A]/index.html +*http://[3ffe:2a00:100:7031::1] +*http://[1080::8:800:200C:417A]/foo +*http://[::192.9.5.5]/ipng +*http://[::FFFF:129.144.52.38]:80/index.html +*http://[2010:836B:4179::836B:4179] !! html/php
- x + x
- y + y http://[2404:130:0:1000::187:2]/index.php
Examples from RFC 2373, section 2.2:
-+
- http://[1080::8:800:200C:417A]/unicast
-- http://[FF01::101]/multicast
-- http://[::1]/loopback
-- http://[::]/unspecified
-- http://[::13.1.68.3]/ipv4compat
-- http://[::FFFF:129.144.52.38]/ipv4compat
- http://[1080::8:800:200C:417A]/unicast
+- http://[FF01::101]/multicast
+- http://[::1]/loopback
+- http://[::]/unspecified
+- http://[::13.1.68.3]/ipv4compat
+- http://[::FFFF:129.144.52.38]/ipv4compat
Examples from RFC 2732, section 2:
-+
- http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
-- http://[1080:0:0:0:8:800:200C:417A]/index.html
-- http://[3ffe:2a00:100:7031::1]
-- http://[1080::8:800:200C:417A]/foo
-- http://[::192.9.5.5]/ipng
-- http://[::FFFF:129.144.52.38]:80/index.html
-- http://[2010:836B:4179::836B:4179]
!! html/parsoid
- http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
+- http://[1080:0:0:0:8:800:200C:417A]/index.html
+- http://[3ffe:2a00:100:7031::1]
+- http://[1080::8:800:200C:417A]/foo
+- http://[::192.9.5.5]/ipng
+- http://[::FFFF:129.144.52.38]:80/index.html
+- http://[2010:836B:4179::836B:4179]
http://[2404:130:0:1000::187:2]/index.php
Examples from RFC 2373, section 2.2:
-+
- http://[1080::8:800:200C:417A]/unicast
-- http://[FF01::101]/multicast
-- http://[::1]/loopback
-- http://[::]/unspecified
-- http://[::13.1.68.3]/ipv4compat
-- http://[::FFFF:129.144.52.38]/ipv4compat
- http://[1080::8:800:200C:417A]/unicast
+- http://[FF01::101]/multicast
+- http://[::1]/loopback
+- http://[::]/unspecified
+- http://[::13.1.68.3]/ipv4compat
+- http://[::FFFF:129.144.52.38]/ipv4compat
Examples from RFC 2732, section 2:
-+
- http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
-- http://[1080:0:0:0:8:800:200C:417A]/index.html
-- http://[3ffe:2a00:100:7031::1]
-- http://[1080::8:800:200C:417A]/foo
-- http://[::192.9.5.5]/ipng
-- http://[::FFFF:129.144.52.38]:80/index.html
-- http://[2010:836B:4179::836B:4179]
!! end !! test @@ -5606,61 +5639,62 @@ IPv6 urls, bracketed format (T23261) [http://[2404:130:0:1000::187:2]/index.php test] Examples from RFC 2373, section 2.2: -* [http://[1080::8:800:200C:417A] unicast] -* [http://[FF01::101] multicast] -* [http://[::1]/ loopback] -* [http://[::] unspecified] -* [http://[::13.1.68.3] ipv4compat] -* [http://[::FFFF:129.144.52.38] ipv4compat] + +*[http://[1080::8:800:200C:417A] unicast] +*[http://[FF01::101] multicast] +*[http://[::1]/ loopback] +*[http://[::] unspecified] +*[http://[::13.1.68.3] ipv4compat] +*[http://[::FFFF:129.144.52.38] ipv4compat] Examples from RFC 2732, section 2: -* [http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1] -* [http://[1080:0:0:0:8:800:200C:417A]/index.html 2] -* [http://[3ffe:2a00:100:7031::1] 3] -* [http://[1080::8:800:200C:417A]/foo 4] -* [http://[::192.9.5.5]/ipng 5] -* [http://[::FFFF:129.144.52.38]:80/index.html 6] -* [http://[2010:836B:4179::836B:4179] 7] +*[http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1] +*[http://[1080:0:0:0:8:800:200C:417A]/index.html 2] +*[http://[3ffe:2a00:100:7031::1] 3] +*[http://[1080::8:800:200C:417A]/foo 4] +*[http://[::192.9.5.5]/ipng 5] +*[http://[::FFFF:129.144.52.38]:80/index.html 6] +*[http://[2010:836B:4179::836B:4179] 7] !! html/php
- http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
+- http://[1080:0:0:0:8:800:200C:417A]/index.html
+- http://[3ffe:2a00:100:7031::1]
+- http://[1080::8:800:200C:417A]/foo
+- http://[::192.9.5.5]/ipng
+- http://[::FFFF:129.144.52.38]:80/index.html
+- http://[2010:836B:4179::836B:4179]
Examples from RFC 2373, section 2.2:
-+
- unicast
-- multicast
-- loopback
-- unspecified
-- ipv4compat
-- ipv4compat
Examples from RFC 2732, section 2:
- + !! html/parsoidExamples from RFC 2373, section 2.2:
-+
- unicast
-- multicast
-- loopback
-- unspecified
-- ipv4compat
-- ipv4compat
Examples from RFC 2732, section 2:
- + !! end !! test @@ -5988,15 +6022,15 @@ A table with no data (take 2) A table with nothing but a caption !! wikitext {| -|+ caption +|+caption |} !! html/php-
!! html/parsoid -caption + caption +
caption !! end !! test @@ -6005,14 +6039,14 @@ A table with caption with default-spaced attributes and a table row {| |+ style="color: red;" | caption1 |- -| foo +|foo |} !! html
caption -
!! end @@ -6022,18 +6056,18 @@ A table with captions with non-default spaced attributes and a table row !! wikitext {| |+style="color: red;"|caption2 -|+ style="color: red;"| caption3 +|+ style="color: red;"|caption3 |- -| foo +|foo |} !! htmlcaption1 + caption1 - foo + foo !! end @@ -6042,23 +6076,23 @@ A table with captions with non-default spaced attributes and a table row Table td-cell syntax variations !! wikitext {| -| foo bar foo | baz -| foo bar foo || baz -| style='color:red;' | baz -| style='color:red;' || baz +|foo bar foo|baz +|foo bar foo||baz +|style='color:red;'|baz +|style='color:red;'||baz |} !! html
caption2 -caption3 + caption3 - foo + foo !! end @@ -6067,19 +6101,19 @@ Table td-cell syntax variations Simple table !! wikitext {| -| 1 || 2 +|1||2 |- -| 3 || 4 +|3||4 |} !! html
- baz + baz -foo bar foo -baz + foo bar foo +baz -baz + baz -style='color:red;' -baz + style='color:red;' +baz !! end @@ -6088,17 +6122,17 @@ Simple table Simple table but with multiple dashes for row wikitext !! wikitext {| -| foo +|foo |----- -| bar +|bar |} !! html
- 1 -2 + 1 +2 - 3 -4 + 3 +4 !! end @@ -6109,67 +6143,67 @@ Multiplication table {| border="1" cellpadding="2" |+Multiplication table |- -! × !! 1 !! 2 !! 3 +!×!!1!!2!!3 |- -! 1 -| 1 || 2 || 3 +!1 +|1||2||3 |- -! 2 -| 2 || 4 || 6 +!2 +|2||4||6 |- -! 3 -| 3 || 6 || 9 +!3 +|3||6||9 |- -! 4 -| 4 || 8 || 12 +!4 +|4||8||12 |- -! 5 -| 5 || 10 || 15 +!5 +|5||10||15 |} !! html
- foo + foo - bar + bar !! end @@ -6178,13 +6212,13 @@ Multiplication table Accept "||" in table headings !! wikitext {| -!h1 || h2 +!h1||h2 |} !! html
Multiplication table - × -1 -2 -3 + × +1 +2 +3 - 1 + 1 -1 -2 -3 + 1 +2 +3 - 2 + 2 -2 -4 -6 + 2 +4 +6 - 3 + 3 -3 -6 -9 + 3 +6 +9 - 4 + 4 -4 -8 -12 + 4 +8 +12 - 5 + 5 -5 -10 -15 + 5 +10 +15 !! end @@ -6193,12 +6227,12 @@ Accept "||" in table headings Accept "!!" in table data !! wikitext {| -| Foo!! || +|Foo!!|| |} !! html
- h1 -h2 + h1 +h2 @@ -6212,13 +6246,13 @@ Accept "!!" in table data Accept "||" in indented table headings !! wikitext :{| -!h1 || h2 +!h1||h2 |} !! html
- Foo!! +Foo!! !! end @@ -6293,9 +6327,9 @@ Accept empty attributes in td/th cells (td/th cells starting with leading ||) !! html
- h1 -h2 + h1 +h2 !! end @@ -6305,13 +6339,13 @@ Accept "| !" at start of line in tables (ignore !-attribute) !! wikitext {| |- -| !style="color:red" | bar +|!style="color:red"|bar |} !! html
- h1 + h1 -a + a !!end @@ -6324,8 +6358,8 @@ Allow +/- in 2nd and later cells in a row, in 1st cell when td-attrs are present |style='color:red;'|+1 |style='color:blue;'|-1 |- -| 1 || 2 || 3 -| 1 ||+2 ||-3 +|1||2||3 +|1||+2||-3 |- | +1 | -1 @@ -6339,18 +6373,18 @@ Allow +/- in 2nd and later cells in a row, in 1st cell when td-attrs are present
- bar + bar -1 - 1 -2 -3 + 1 +2 +3 -1 -+2 +1 ++2 -3 - !!end @@ -6359,26 +6393,26 @@ Allow +/- in 2nd and later cells in a row, in 1st cell when td-attrs are present Table rowspan !! wikitext {| border=1 -| Cell 1, row 1 -|rowspan=2| Cell 2, row 1 (and 2) -| Cell 3, row 1 +|Cell 1, row 1 +|rowspan=2|Cell 2, row 1 (and 2) +|Cell 3, row 1 |- -| Cell 1, row 2 -| Cell 3, row 2 +|Cell 1, row 2 +|Cell 3, row 2 |} !! html+1 + +1 --1 + -1 !! end @@ -6399,7 +6433,7 @@ Nested table !! html
- Cell 1, row 1 + Cell 1, row 1 -Cell 2, row 1 (and 2) + Cell 2, row 1 (and 2) -Cell 3, row 1 + Cell 3, row 1 - Cell 1, row 2 + Cell 1, row 2 -Cell 3, row 2 + Cell 3, row 2
- α + α @@ -6444,7 +6478,7 @@ Table cell attributes: Pipes protected by nowikis should be treated as a plain c
!! html/parsoid @@ -6484,17 +6518,17 @@ parsoid=wt2html,html2html Element attributes with double ! should not be broken up bybar -title="foo|" bar + title="foo|" bar !! wikitext {| -! hi haho +!hihaho |} !! html/php!! html/parsoid
- hi haho +hi haho-
!! end @@ -6502,17 +6536,17 @@ Element attributes with double ! should not be broken up by+ hi hahohi haho! and || in element attributes should not be parsed as / !! wikitext {| -| hi+|hi|} !! html/php!! html/parsoid
- hi+ hi-
!! end @@ -6523,18 +6557,18 @@ Element attributes with double ! should not be broken up by+ hi hiparsoid=wt2html !! wikitext {| -| style="color: red !important;" data-contrived="put this here ||" | foo +|style="color: red !important;" data-contrived="put this here ||"|foo |} !! html/php !! html/parsoid
- style="color: red !important;" data-contrived="put this here -foo + style="color: red !important;" data-contrived="put this here +foo -
!! end @@ -6580,22 +6614,22 @@ Invalid text in table attributes should be discarded parsoid=wt2html !! wikitext {| boo style='border:1px solid black' -| boo style='color:blue' | 1 -|boo style='color:blue'| 2 +| boo style='color:blue' |1 +|boo style='color:blue'|2 |} !! html/php+ style="color: red !important;" data-contrived="put this here foo style="color: red !important;" data-contrived="put this here foo !! html/parsoid
- 1 + 1 -2 + 2 !! end @@ -6640,7 +6674,7 @@ parsoid={
- 1 -2 +1 +2 Foo -style="color:red;" +style="color:red;" Bar Foo @@ -6754,14 +6788,14 @@ parsoid=wt2html,html2html {| |- -! foo +!foo |} !! html/* !! end @@ -6774,14 +6808,14 @@ parsoid=wt2html,html2html {| |- -| foo +|foo |} !! html/*
- foo + foo !! end @@ -6792,17 +6826,17 @@ Table attributes with empty value parsoid=wt2html,html2html !! wikitext {| -| style=| hello +| style=|hello |} !! html/php
- foo + foo !! html/parsoid
- hello + hello -
!! end @@ -6811,7 +6845,7 @@ Wikitext table with a lot of comments !! wikitext {| -| foo +|foo |- @@ -6821,7 +6855,7 @@ Wikitext table with a lot of comments !! html+ hello hello
- foo + foo @@ -6834,18 +6868,18 @@ Wikitext table comments represented in parsoid dom !! wikitext {| |- -| x +|x |} !! html/php+tidy !! html/parsoid
- x + x !! end @@ -6871,14 +6905,14 @@ Table cell with a single comment !! wikitext {| | -| a +|a |} !! html
- +x x !! end @@ -6889,21 +6923,21 @@ Table-cell after a comment-only-empty-line {| |a -| b +|b |} !! html
- a + a !! html/parsoid
a -b + b !! end @@ -6912,21 +6946,21 @@ Table-cell after a comment-only-empty-line Build table with {{!}} !! wikitext {{{!}} class="wikitable" -! header -! second header +!header +!second header {{!}}- style="color:red;" -{{!}} data {{!}}{{!}} style="color:red;" {{!}} second data +{{!}}data{{!}}{{!}} style="color:red;" {{!}}second data {{!}}} !! html
+ a -b b !! end @@ -6935,33 +6969,33 @@ Build table with {{!}} Build table with pipe as data !! wikitext {| class="wikitable" -! header -! second header +!header +!second header |- style="color:red;" -| data || style="color:red;" | second data +|data|| style="color:red;" |second data |- -| style="color:red;" | data with | || style="color:red;" | second data with | +| style="color:red;" |data with | || style="color:red;" | second data with | |- -|| data with | ||| second data with | +||data with | |||second data with | |} !! html
- header + header -second header + second header - data -second data + data +second data !! end @@ -6970,25 +7004,25 @@ Build table with pipe as data Build table with wikilink !! wikitext {| class="wikitable" -! header || second header +!header||second header |- style="color:red;" -| data [[Main Page|linktext]] || second data [[Main Page|linktext]] +|data [[Main Page|linktext]]||second data [[Main Page|linktext]] |- -| data || second data [[Main Page|link|text with pipe]] +|data||second data [[Main Page|link|text with pipe]] |} !! html
- header + header -second header + second header - data -second data + data +second data - data with | -second data with | + data with | +second data with | - data with | -second data with | + data with | +second data with | !! end @@ -7069,20 +7103,20 @@ Template generated table cell with attributes !! wikitext {| |- -{{table_attribs_4}} || a || b +{{table_attribs_4}} ||a||b |} !! html/php+tidy
- header -second header + header +second header - data linktext -second data linktext + data linktext +second data linktext - data -second data link|text with pipe + data +second data link|text with pipe !! html/parsoid
- - a -b + + a +b -!! html+tidy +!! html/php+tidy a
- +a b a b !! end !! test @@ -7147,17 +7181,17 @@ Parsoid: Row-syntax table headings followed by comment & table cells parsoid=wt2html,wt2wt !! wikitext {| -! foo || bar - || baz || quux +!foo||bar + ||baz||quux |} !! html/php!! html/parsoid @@ -9229,6 +9263,7 @@ language=is Redirect syntax under text isn't considered a redirect !! wikitext some text + #redirect [[Main Page]] !! html/parsoid
- foo -bar + foo +bar -baz -quux + baz +quux some text
@@ -9251,9 +9286,9 @@ Redirect followed by block on the same line !! options parsoid=wt2html !! wikitext -#REDIRECT [[Main Page]]== hi == +#REDIRECT [[Main Page]]==hi== !! html/parsoid -hi
+hi
!! end !! test @@ -9480,11 +9515,11 @@ Horizontal ruler -- Supports content following dashes on same line Common list !! wikitext *Common list -* item 2 +*item 2 *item 3 !! html!! end @@ -9494,21 +9529,22 @@ Numbered list !! wikitext #Numbered list #item 2 -# item 3 +#item 3 !! html
- Common list
-- item 2
+- item 2
- item 3
+
- Numbered list
- item 2
-- item 3
- item 3
!! end +# the switch from level 3 to ordered should not introduce a newline between !! test Mixed list !! wikitext *Mixed list -*# with numbers -** and bullets -*# and numbers +*#with numbers +**and bullets +*#and numbers *bullets again **bullet level 2 ***bullet level 3 @@ -9518,13 +9554,13 @@ Mixed list **#Number on level 3 *#number level 2 *Level 1 -*** Level 3 -#** Level 3, but ordered +***Level 3 +#**Level 3, but ordered !! html-
- Mixed list -
+-
- with numbers
-
- and bullets
- and numbers
+
- with numbers
+
- and bullets
- and numbers
- bullets again
- bullet level 2
- bullet level 3 @@ -9534,43 +9570,43 @@ Mixed list
- Number on level 3
- number level 2
- Level 1 -
- Level 3
+
- Level 3, but ordered
+
- Level 3
!! end !! test 1. Nested mixed wikitext and html list !! wikitext -* hi -*
- Level 3, but ordered
-* hi -** ho +*hi +*
- ho
+*hi +**ho !! html/php -
- ho
+
- hi
-- -
- ho
- hi -
- ho
!! html/parsoid -
- hi
+- +
- ho
- hi +
- ho
+
- hi
-- -
- ho
- hi -
- ho
!! end !! test 2. Nested mixed wikitext and html list (incompatible) !! wikitext -; hi -: {{echo|
- hi
+- +
- ho
- hi +
- ho
- ho
}} +;hi +:{{echo|- ho
}} !! html/php -+
- hi
-- ho
!! html/parsoid -
- hi
+- ho
+
- hi
-- ho
!! end !! test @@ -9642,24 +9678,24 @@ Nested lists 6 (both elements empty) !! test Nested lists 7 (skip initial nesting levels) !! wikitext -*** foo +***foo !! html -
- hi
+- ho
+
- foo
!! end !! test Nested lists 8 (multiple nesting transitions) !! wikitext -* foo -*** bar -** baz -* boo +*foo +***bar +**baz +*boo !! html -
- foo
+
- foo -
-
- -
- bar
- baz
- boo
!! end @@ -9700,60 +9736,61 @@ parsoid !! test List items are not parsed correctly following a
- foo +
+
- +
- bar
- baz
- boo
block (T2785) !! wikitext -*foo-*bar-* zar +*foo+*bar+*zar !! html/php -+
- -
foo- -
bar- zar
!! html/parsoid -
- +
foo- +
bar- zar
+
- -
foo- -
bar- zar
!! end +# FIXME: Might benefit from a html/parsoid since this has a template !! test List items from template !! wikitext {{inner list}} -* item 2 +*item 2 -* item 0 +*item 0 {{inner list}} -* item 2 +*item 2 -* item 0 -* notSOL{{inner list}} -* item 2 +*item 0 +*notSOL{{inner list}} +*item 2 !! html -
- +
foo- +
bar- zar
-
- item 1
-- item 2
-
- item 0
-- item 1
-- item 2
+
- item 0
-- notSOL
-- item 1
-- item 2
+
- item 1
+- item 2
+
- item 0
+- item 1
+- item 2
!! end !! test List interrupted by empty line or heading !! wikitext -* foo +*foo -** bar -== A heading == -* Another list item +**bar +==A heading== +*Another list item !! html -
- item 0
+- notSOL
+- item 1
+- item 2
-
- foo
+
- bar
+
- foo
- bar
A heading[edit]
-+
- Another list item
!!end @@ -9775,6 +9812,10 @@ Multiple list tags generated by templates
- Another list item
- b
- c
+!! html/parsoid +- a +
- b +
- c
!!end !!test @@ -9821,29 +9862,29 @@ Test the li-hack (a hack from Tidy days, but doesn't work as advertised with Rem !!options parsoid=wt2html,wt2wt !! wikitext -* foo -*- li-hack -* {{echo|
- templated li-hack}} -*
- unsupported li-hack with preceding comments +*foo +*
- li-hack +*{{echo|
- templated li-hack}} +*
- unsupported li-hack with preceding comments
!! html+tidy -
- not a li-hack
+
- foo
-- li-hack
-- templated li-hack
-- unsupported li-hack with preceding comments
- foo
+- li-hack
+- templated li-hack
+- unsupported li-hack with preceding comments
!! html/parsoid
- not a li-hack
+
- foo
-- li-hack
-- templated li-hack
-- unsupported li-hack with preceding comments
- li-hack
+- templated li-hack
+- unsupported li-hack with preceding comments
- not a li-hack @@ -9857,24 +9898,26 @@ Parsoid: Make sure nested lists are serialized on their own line even if HTML co !! options parsoid !! wikitext -# foo -## bar -* foo -** bar -: foo -:: bar +#foo +##bar + +*foo +**bar + +:foo +::bar !! html
-
- foo
-
- bar
+- foo
+
- bar
-
- foo
-
- bar
+- foo
+
- bar
-
+- foo
-
!! end @@ -9908,7 +9951,7 @@ Unbalanced closing block tags break a list- bar
+- foo
+
- bar
- a
-!! html+parsoid +!! html/parsoid- b
@@ -9944,14 +9987,14 @@ Unclosed formatting tags that straddle lists are closed and reopened !! options parsoid=wt2html,wt2wt,html2html !! wikitext -#
- a
a -# b+#a +#b!! html/php+tidy -+
a-b!! html/parsoid -
a+b+
- -
ab!! end # Output is ugly because of all the misnested tag fixups. @@ -9966,16 +10009,16 @@ parsoid=wt2html,wt2wt,html2html 1. List embedded in a formatting tag !! wikitext -* foo +*foo !! html/php+tidy
- +
ab-
- foo
+
- foo
!! html/parsoid
-
!!end @@ -10156,35 +10199,35 @@ Magic Word: {{CURRENTTIMESTAMP}} !! test Magic Words LOCAL (UTC) !! wikitext -* {{LOCALMONTH}} -* {{LOCALMONTH1}} -* {{LOCALMONTHNAME}} -* {{LOCALMONTHNAMEGEN}} -* {{LOCALMONTHABBREV}} -* {{LOCALDAY}} -* {{LOCALDAY2}} -* {{LOCALDAYNAME}} -* {{LOCALYEAR}} -* {{LOCALTIME}} -* {{LOCALHOUR}} -* {{LOCALWEEK}} -* {{LOCALDOW}} -* {{LOCALTIMESTAMP}} -!! html -- foo
+- foo
+*{{LOCALMONTH}} +*{{LOCALMONTH1}} +*{{LOCALMONTHNAME}} +*{{LOCALMONTHNAMEGEN}} +*{{LOCALMONTHABBREV}} +*{{LOCALDAY}} +*{{LOCALDAY2}} +*{{LOCALDAYNAME}} +*{{LOCALYEAR}} +*{{LOCALTIME}} +*{{LOCALHOUR}} +*{{LOCALWEEK}} +*{{LOCALDOW}} +*{{LOCALTIMESTAMP}} +!! html +
- 01
-- 1
-- January
-- January
-- Jan
-- 1
-- 01
-- Thursday
-- 1970
-- 00:02
-- 00
-- 1
-- 4
-- 19700101000203
!! end @@ -11250,11 +11293,11 @@ Templates with templated name !! html
- 01
+- 1
+- January
+- January
+- Jan
+- 1
+- 01
+- Thursday
+- 1970
+- 00:02
+- 00
+- 1
+- 4
+- 19700101000203
foo
-+
- item 1
!! html/parsoid
- item 1
foo
-+
- item 1
!! end ## Regression test; the output here isn't really that interesting. @@ -11338,28 +11381,28 @@ T2553: link with two variables in a piped link Abort table cell attribute parsing on wikilink !! wikitext {| -| testing [[one|two]] | three || four -| testing one two | three || four -| testing="[[one|two]]" | three || four +|testing [[one|two]] |three||four +|testing one two |three||four +|testing="[[one|two]]" |three||four |} !! html/php
- item 1
!! html/parsoid
- testing two | three -four + testing two |three +four -three -four + three +four -testing="two" | three -four + testing="two" |three +four -
!! end @@ -11367,11 +11410,11 @@ Abort table cell attribute parsing on wikilink Don't abort table cell attribute parsing if wikilink is found in template arg !! wikitext {| -| Test {{#tag:ref|One two "[[three]]" four}} +|Test {{#tag:ref|One two "[[three]]" four}} |} !! html/parsoid+ testing two | three four -three four -testing="two" | three four testing two |three four +three four +testing="two" |three four -
!! end @@ -11485,12 +11528,12 @@ foo {{table}}+ Test One two "three" four Test One two "three" four !! end @@ -11505,12 +11548,12 @@ foo
- 1 -2 + 1 +2 - 3 -4 + 3 +4 !! end @@ -11828,32 +11871,32 @@ Includes and comments at SOL !! options parsoid=wt2html,html2html !! wikitext -
- 1 -2 + 1 +2 - 3 -4 + 3 +4 == hu == + ==hu== some - * stuff -* here +*stuff +*here -can have stuff === here === +can have stuff ===here=== !! html/phphu
some
-+
- stuff
-- here
- stuff
+- here
here
!! html/parsoid -hu
+hu
some
-+
- stuff
-- here
-
- stuff
+- here
here
+here
!! end @@ -12072,10 +12115,10 @@ Preprocessor precedence 5: tplarg takes precedence over template !! wikitext {{Precedence5|Bullet}} !! html/php -+
- Bar
!! html/parsoid -
- Bar
+
- Bar
!! end !! test @@ -12165,14 +12208,14 @@ Preprocessor precedence 9: groups of braces {{Preprocessor precedence 9|Four|Bullet|1|2}} !! html/php
- Bar
-
- 4
-- {Four}
+- {Four}
- 5
-+
- Bar
- Bar
+
- 6
-- Four
+- Four
- 7
-- {Bullet}
- {Bullet}
!! html/parsoid@@ -12210,21 +12253,21 @@ language=zh {{Preprocessor precedence 10|Three|raw2|Bullet|1|2}} !! html/php
+-
- 1
-- raw
+- raw
- 2
-- -
+
- Bar-
- -
- Bar-
-
- 3
-- -Three-
+- -Three-
- 4
-- raw2
+- raw2
- 5
-- -
+
- Bar-
- -
+
- Bar-
+
- 6
-- -Three-
+- -Three-
- 7
-- raw2
- raw2
!! html/parsoid@@ -12278,14 +12321,14 @@ Preprocessor precedence 12: broken language converter closed by brace. parsoid=wt2html !! wikitext This form breaks the template, which is unfortunate: -* {{echo|foo-{bar}bat}} +*{{echo|foo-{bar}bat}} But if the broken language converter markup is inside an extension tag, nothing bad happens: -*
foo-{bar}bat -* {{echo|foo-{bar}bat }} -*foo-{bar}bat-* {{echo|foo-{bar}bat}} +*foo-{bar}bat +*{{echo|foo-{bar}bat }} +*foo-{bar}bat+*{{echo|foo-{bar}bat}}foo-{bar}bat {{echo|foo-{bar}bat }} @@ -12293,14 +12336,14 @@ tag, nothing bad happens: !! html/php+tidyThis form breaks the template, which is unfortunate:
-+
- {{echo|foo-{bar}bat}}
- {{echo|foo-{bar}bat}}
But if the broken language converter markup is inside an extension tag, nothing bad happens:
-+
- foo-{bar}bat
-- foo-{bar}bat
-- -
foo-{bar}bat foo-{bar}bat
- foo-{bar}bat
+- foo-{bar}bat
+- +
foo-{bar}bat foo-{bar}bat'foo-{bar}bat' array ( ) @@ -12329,13 +12372,13 @@ Preprocessor precedence 13: broken language converter in external link !! options parsoid=wt2html !! wikitext -* [http://example.com/-{foo Example in URL] -* [http://example.com Example in -{link} description] -* {{echo|[http://example.com/-{foo Breaks template, however]}} +*[http://example.com/-{foo Example in URL] +*[http://example.com Example in -{link} description] +*{{echo|[http://example.com/-{foo Breaks template, however]}} !! html/php+tidy -+ !! html/parsoid
- Example in URL
@@ -12347,18 +12390,18 @@ parsoid=wt2html !! test Preprocessor precedence 14: broken language converter in comment !! wikitext -* ...should be ok -* ...extra dashes -* {{echo|foobat}} ...should be ok +*...should be ok +*...extra dashes +*{{echo|foobat}}...should be ok !! html/php+tidy -+
- ...should be ok
-- ...extra dashes
-- foobat ...should be ok
!! html/parsoid
- ...should be ok
+- ...extra dashes
+- foobat...should be ok
-
!! end @@ -12444,6 +12487,32 @@ parsoid=wt2html- ...should be ok
-- ...extra dashes
-- foobat ...should be ok
+- ...should be ok
+- ...extra dashes
+- foobat...should be ok
hi {{}}
!! end +!! test +Preprocessor precedence 18: another rightmost wins scenario +!! options +parsoid=wt2html +!! wikitext +{{ -{{{{1|tplarg}}} }} }- +!! html/php +{{ -{tplarg }} }- +
+!! html/parsoid +{{ -{tplarg }} }-
+!! end + +!! test +Preprocessor precedence 19: break syntax +!! options +parsoid=wt2html +!! wikitext +-{{ +!! html/php +-{{ +
+!! html/parsoid +-{{
+!! end + ### ### Token Stream Patcher tests ### @@ -12908,17 +12977,17 @@ Templates: Support for templates generating attributes and content 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables !! wikitext {| -| {{table_attribs_6}} hi +|{{table_attribs_6}} hi |} !! html/php!! html/parsoid
- hi + hi -
!! end @@ -13037,10 +13106,14 @@ Templates: Wiki Tables: 1a. Fostering of entire template content a+ hi hi +!! html/parsoid +
a
+ +
!! end !!test @@ -15156,6 +15229,10 @@ Image: caption containing leading space !!end +# html/php output not have newlines after table, td, th, etc. because +# Linker::makeThumbLink2() replaces the newlines with spaces since +# the table is inside a caption. +# FIXME: Verify if that circa 2004 fix is still required. !! test Image: caption containing a table !! options @@ -15163,21 +15240,21 @@ parsoid=wt2html,wt2wt,html2html !! wikitext [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table {| -! Foo !! Bar +!Foo!!Bar |- -| Foo1 || Bar1 +|Foo1||Bar1 |} and some more text.]] !! html/php - + !! html/parsoid!! end @@ -16287,7 +16364,7 @@ es:1 fr:1 !! test Basic section headings !! wikitext -== Headline 1 == +==Headline 1== Some text ==Headline 2== @@ -16309,12 +16386,12 @@ Blah blah !! test Section headings with TOC !! wikitext -== Headline 1 == -=== Subheadline 1 === -===== Skipping a level ===== -====== Skipping a level ====== +==Headline 1== +===Subheadline 1=== +=====Skipping a level===== +======Skipping a level====== -== Headline 2 == +==Headline 2== Some text ===Another headline=== !! html @@ -16356,10 +16433,10 @@ Some text TOC anchors don't collide !! wikitext __FORCETOC__ -== Headline 2 == -== Headline == -== Headline 2 == -== Headline == +==Headline 2== +==Headline== +==Headline 2== +==Headline== !! html/phpThis is an example image thumbnail caption with a table -
and some more text.+ Foo Bar Foo Bar - Foo1 +Foo1 Bar1 Contents
@@ -16384,16 +16461,16 @@ Handling of sections up to level 6 and beyond !! options parsoid=wt2html !! wikitext -= Level 1 Heading= -== Level 2 Heading== -=== Level 3 Heading=== -==== Level 4 Heading==== -===== Level 5 Heading===== -====== Level 6 Heading====== -======= Level 7 Heading======= -======== Level 8 Heading======== -========= Level 9 Heading========= -========== Level 10 Heading========== +=Level 1 Heading= +==Level 2 Heading== +===Level 3 Heading=== +====Level 4 Heading==== +=====Level 5 Heading===== +======Level 6 Heading====== +=======Level 7 Heading======= +========Level 8 Heading======== +=========Level 9 Heading========= +==========Level 10 Heading========== !! html/php
Contents
@@ -16408,10 +16485,10 @@ parsoid=wt2html
@@ -16431,33 +16508,33 @@ parsoid=wt2html- 1.1.1.1.1 Level 5 Heading
- 1.1.1.1.1.1 Level 6 Heading
-- 1.1.1.1.1.2 = Level 7 Heading=
-- 1.1.1.1.1.3 == Level 8 Heading==
-- 1.1.1.1.1.4 === Level 9 Heading===
-- 1.1.1.1.1.5 ==== Level 10 Heading====
+- 1.1.1.1.1.2 =Level 7 Heading=
+- 1.1.1.1.1.3 ==Level 8 Heading==
+- 1.1.1.1.1.4 ===Level 9 Heading===
+- 1.1.1.1.1.5 ====Level 10 Heading====
Level 4 Heading[edit]
Level 5 Heading[edit]
Level 6 Heading[edit]
-= Level 7 Heading=[edit]
-== Level 8 Heading==[edit]
-=== Level 9 Heading===[edit]
-==== Level 10 Heading====[edit]
+=Level 7 Heading=[edit]
+==Level 8 Heading==[edit]
+===Level 9 Heading===[edit]
+====Level 10 Heading====[edit]
!! html/parsoid -Level 1 Heading
-Level 2 Heading
-Level 3 Heading
-Level 4 Heading
-Level 5 Heading
-Level 6 Heading
-= Level 7 Heading=
-== Level 8 Heading==
-=== Level 9 Heading===
-==== Level 10 Heading====
+Level 1 Heading
+Level 2 Heading
+Level 3 Heading
+Level 4 Heading
+Level 5 Heading
+Level 6 Heading
+=Level 7 Heading=
+==Level 8 Heading==
+===Level 9 Heading===
+====Level 10 Heading====
!! end !! test TOC regression (T11764) !! wikitext -== title 1 == -=== title 1.1 === -==== title 1.1.1 ==== -=== title 1.2 === -== title 2 == -=== title 2.1 === +==title 1== +===title 1.1=== +====title 1.1.1==== +===title 1.2=== +==title 2== +===title 2.1=== !! htmlContents
@@ -16509,12 +16586,12 @@ TOC with wgMaxTocLevel=3 (T8204) !! options wgMaxTocLevel=3 !! wikitext -== title 1 == -=== title 1.1 === -==== title 1.1.1 ==== -=== title 1.2 === -== title 2 == -=== title 2.1 === +==title 1== +===title 1.1=== +====title 1.1.1==== +===title 1.2=== +==title 2== +===title 2.1=== !! html
Contents
@@ -16575,8 +16652,8 @@ wgMaxTocLevel=3 !! test Resolving duplicate section names !! wikitext -== Foo bar == -== Foo bar == +==Foo bar== +==Foo bar== !! html
Foo bar[edit]
Foo bar[edit]
@@ -16586,8 +16663,8 @@ Resolving duplicate section names !! test Resolving duplicate section names with differing case (T12721) !! wikitext -== Foo bar == -== Foo Bar == +==Foo bar== +==Foo Bar== !! htmlFoo bar[edit]
Foo Bar[edit]
@@ -16641,9 +16718,9 @@ Link inside a section heading TOC regression (T14077) !! wikitext __TOC__ -== title 1 == -=== title 1.1 === -== title 2 == +==title 1== +===title 1.1=== +==title 2== !! htmlContents
@@ -16704,19 +16781,19 @@ Header with special characters (T27462) !! wikitext The tooltips shall not show entities to the user (ie. be double escaped) -== text > text == +==text > text== section 1 -== text < text == +==text < text== section 2 -== text & text == +==text & text== section 3 -== text ' text == +==text ' text== section 4 -== text " text == +==text " text== section 5 !! html/php
The tooltips shall not show entities to the user (ie. be double escaped) @@ -16749,19 +16826,19 @@ section 5 !! html/parsoid
The tooltips shall not show entities to the user (ie. be double escaped)
-text > text
+text > text
section 1
-text < text
+text < text
section 2
-text & text
+text & text
section 3
-text ' text
+text ' text
section 4
-text " text
+text " text
section 5
!! end @@ -16770,22 +16847,22 @@ Header with space, plus and underscore as entity !! wikitext Id should not contain + for spaces -== Space between Text == +==Space between Text== section 1 -== Space-Entity between Text == +==Space-Entity between Text== section 2 -== Plus+between+Text == +==Plus+between+Text== section 3 -== Plus-Entity+between+Text == +==Plus-Entity+between+Text== section 4 -== Underscore_between_Text == +==Underscore_between_Text== section 5 -== Underscore-Entity_between_Text == +==Underscore-Entity_between_Text== section 6 [[#Space between Text]] @@ -16835,22 +16912,22 @@ section 6 !! html/parsoidId should not contain + for spaces
-Space between Text
+Space between Text
section 1
-Space-Entity between Text
+Space-Entity between Text
section 2
-Plus+between+Text
+Plus+between+Text
section 3
-Plus-Entity+between+Text
+Plus-Entity+between+Text
section 4
-Underscore_between_Text
+Underscore_between_Text
section 5
-Underscore-Entity_between_Text
+Underscore-Entity_between_Text
section 6
#Space between Text @@ -16899,13 +16976,13 @@ HTML headers vs TOC (T25393) (__NOEDITSECTION__ for clearer output, doesn't matter here) !! wikitext
Header 1
-== Header 1.1 == -== Header 1.2 == +==Header 1.1== +==Header 1.2==Header 2
-== Header 2.1 == -== Header 2.2 == +==Header 2.1== +==Header 2.2== __NOEDITSECTION__ !! html/php@@ -16928,19 +17005,20 @@ __NOEDITSECTION__Contents
Header 1
Header 1.1
Header 1.2
-Header 2
+Header 2 +
Header 2.1
Header 2.2
!! html/parsoidHeader 1
-Header 1.1
-Header 1.2
+Header 1.1
+Header 1.2
Header 2
-Header 2.1
-Header 2.2
+Header 2.1
+Header 2.2
!! end @@ -17104,17 +17182,17 @@ table with multiple empty attribute values parsoid=wt2html,html2html !! wikitext {| title= id= -| hi +|hi |} !! html/php!! html/parsoid
- hi + hi -
!! end @@ -17155,12 +17233,12 @@ HTML multiple attributes correction Table multiple attributes correction !! wikitext {| -!+ class="error" class="awesome"| status +!+ class="error" class="awesome"|status |} !! html+ hi hi !!end @@ -17386,9 +17464,8 @@ Media link with nasty text !! html/php Safe Link<div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div> -!! html+php/tidy - - +!! html/php+tidy + !! html/parsoid @@ -17912,12 +17989,12 @@ MSIE 6 CSS safety test: Repetition markers (T57332) Table attribute legitimate extension !! wikitext {| -!+ style="
- status + status color:blue "| status +!+ style="color:blue "|status |} !! html!!end @@ -17926,12 +18003,12 @@ Table attribute legitimate extension Table attribute safety !! wikitext {| -!+ style="
- status + status border-width:expression(0+alert(document.cookie)) "| status +!+ style="border-width:expression(0+alert(document.cookie)) "|status |} !! html!! end @@ -18241,6 +18318,27 @@ this is a '''test'''
- status + status this is a test
!! end +!! test +Parser hook: horizontal rule inside extension tag that outputs+!! wikitext ++Hello + +!! html/php +
+Goodbye ++' +Hello ++ +!! end + ### ### (see tests/parser/parserTestsParserHook.php for the
+Goodbye +' +array ( +) +extension) ### @@ -18809,7 +18907,7 @@ Fuzz testing: Parser13 !! test Fuzz testing: Parser14 !! wikitext -== onmouseover= == +==onmouseover=== http://__TOC__ !! html/php onmouseover=[edit]
@@ -18828,7 +18926,7 @@ http://<!! html/parsoid -onmouseover=
+onmouseover=
!! end @@ -18880,12 +18978,12 @@ Fuzz testing: Parser16 Fuzz testing: Parser21 !! wikitext {| -! irc://{{ftp://a" onmouseover="alert('hello world');" +!irc://{{ftp://a" onmouseover="alert('hello world');" | !! html
- irc://{{ftp://a" onmouseover="alert('hello world');" + irc://{{ftp://a" onmouseover="alert('hello world');" @@ -20056,23 +20154,23 @@ xxx !! test Handling of in URLs !! wikitext -** irc:// a +*irc:// a !! html/php - + !! html/parsoid - + !! end !! test Handling of %0A in URLs !! wikitext -** irc://%0Aa +*irc://%0Aa !! html/php - + !! html/parsoid - + !! end # The PHP parser strips the empty tags out for giggles; parsoid doesn't. @@ -20142,51 +20240,51 @@ Say the magic word !! options title=[[Parser test]] !! wikitext -* {{PAGENAME}} -* {{PAGENAMEE}} -* {{FULLPAGENAME}} -* {{FULLPAGENAMEE}} -* {{BASEPAGENAME}} -* {{BASEPAGENAMEE}} -* {{SUBPAGENAME}} -* {{SUBPAGENAMEE}} -* {{ROOTPAGENAME}} -* {{ROOTPAGENAMEE}} -* {{TALKPAGENAME}} -* {{TALKPAGENAMEE}} -* {{SUBJECTPAGENAME}} -* {{SUBJECTPAGENAMEE}} -* {{NAMESPACEE}} -* {{NAMESPACE}} -* {{NAMESPACENUMBER}} -* {{TALKSPACE}} -* {{TALKSPACEE}} -* {{SUBJECTSPACE}} -* {{SUBJECTSPACEE}} -* {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}} -!! html - +*{{PAGENAME}} +*{{PAGENAMEE}} +*{{FULLPAGENAME}} +*{{FULLPAGENAMEE}} +*{{BASEPAGENAME}} +*{{BASEPAGENAMEE}} +*{{SUBPAGENAME}} +*{{SUBPAGENAMEE}} +*{{ROOTPAGENAME}} +*{{ROOTPAGENAMEE}} +*{{TALKPAGENAME}} +*{{TALKPAGENAMEE}} +*{{SUBJECTPAGENAME}} +*{{SUBJECTPAGENAMEE}} +*{{NAMESPACEE}} +*{{NAMESPACE}} +*{{NAMESPACENUMBER}} +*{{TALKSPACE}} +*{{TALKSPACEE}} +*{{SUBJECTSPACE}} +*{{SUBJECTSPACEE}} +*{{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}} +!! html +
- Parser test
-- Parser_test
-- Parser test
-- Parser_test
-- Parser test
-- Parser_test
-- Parser test
-- Parser_test
-- Parser test
-- Parser_test
-- Talk:Parser test
-- Talk:Parser_test
-- Parser test
-- Parser_test
-- -
- -
- 0
-- Talk
-- Talk
-- -
- -
- Template:Dynamic
!! end ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included. @@ -20902,20 +21000,20 @@ Illegal character references (T106578) ; Surrogate: ; This is an okay astral character: 💩 !! html+tidy -
- Parser test
+- Parser_test
+- Parser test
+- Parser_test
+- Parser test
+- Parser_test
+- Parser test
+- Parser_test
+- Parser test
+- Parser_test
+- Talk:Parser test
+- Talk:Parser_test
+- Parser test
+- Parser_test
+ + +- 0
+- Talk
+- Talk
+ + +- Template:Dynamic
+
- Null
-- �
-- FF
-- 
-- CR
-- 
-- Control (low)
-- 
-- Control (high)
--  Ÿ
-- Surrogate
-- ��
-- This is an okay astral character
-- 💩
!! end !! test @@ -21279,20 +21377,20 @@ parsoid=wt2html !! test Definition list code coverage !! wikitext -; title : def -; title : def +;title : def +;title : def ;title: def !! html/php -
- Null
+- �
+- FF
+- 
+- CR
+- 
+- Control (low)
+- 
+- Control (high)
+-  Ÿ
+- Surrogate
+- ��
+- This is an okay astral character
+- 💩
!! html/parsoid -
- title
-- def
-- title
-- def
++
- title
+- def
+- title
+- def
- title
-- def
- def
- title Â
- def
-- titleÂ
- def
+!! end @@ -21537,7 +21635,7 @@ anchorencode encodes like the TOC generator: (T20431) !! config wgFragmentMode=[ 'html5', 'legacy' ] !! wikitext -=== _ +:.3A%3A _ &&]] x === +===_ +:.3A%3A _ &&]] x=== {{anchorencode: _ +:.3A%3A _ &&]] x}} __NOEDITSECTION__ !! html/php @@ -21545,7 +21643,7 @@ __NOEDITSECTION__
- title Â
- def
+- titleÂ
- def
- title
- def
+:.3A%3A_&&]]_x
!! html/parsoid -_ +:.3A%3A _ &&]] x
+_ +:.3A%3A _ &&]] x
+:.3A%3A_&&]]_x
!! end @@ -21555,7 +21653,7 @@ anchorencode encodes like the TOC generator: (T20431) (legacy) !! config wgFragmentMode=[ 'legacy' ] !! wikitext -=== _ +:.3A%3A&&]] === +===_ +:.3A%3A&&]]=== {{anchorencode: _ +:.3A%3A&&]] }} __NOEDITSECTION__ !! html/php @@ -21839,12 +21937,12 @@ wgFragmentMode=[ 'html5', 'legacy' ] !! options language=sr variant=sr-ec !! wikitext -== -{Naslov}- == +==-{Naslov}-== Note that even an unprotected headline ID is not affected by language conversion: -== Latinski == +==Latinski== !! html/phpNaslov[ÑÑеди]
ÐоÑе ÑÑ Ð°Ñ ÐµÐ²ÐµÐ½ ан ÑнпÑоÑеÑÑед Ñ ÐµÐ°Ð´Ð»Ð¸Ð½Ðµ ÐÐ Ð¸Ñ Ð½Ð¾Ñ Ð°ÑÑеÑÑед бy лангÑаге @@ -21853,7 +21951,7 @@ conversion:
ÐаÑинÑки[ÑÑеди]
!! html/parsoid -+
Note that even an unprotected headline ID is not affected by language conversion:
@@ -22740,7 +22838,7 @@ parsoid=wt2html,wt2wt,html2html!! html/parsoid @@ -22871,20 +22969,20 @@ language=sr !! test T2529: Uncovered bullet !! wikitext -* Foo {{bullet}} +*Foo {{bullet}} !! html -
- B + B +
- Foo
-- Bar
!! end !! test T2529: Uncovered bullet in a deeply nested list !! wikitext -******* Foo {{bullet}} +*******Foo {{bullet}} !! html -
- Foo
+- Bar
+
- -
- Foo
- Bar
!! end @@ -22900,12 +22998,12 @@ y
- +
- Foo
- Bar
- 1 -2 + 1 +2 - 3 -4 + 3 +4 y
@@ -22914,10 +23012,10 @@ y !! test T2529: Uncovered bullet in parser function result !! wikitext -* Foo {{lc:{{bullet}} }} +*Foo {{lc:{{bullet}} }} !! html -+
- Foo
-- bar
!! end @@ -23124,6 +23222,7 @@ Line two Line two !! end +# Parsoid's output is broken on this because of Tidy-compatibility cruft !! test T8200: paragraphs inside blockquotes (extra line break on close) !! wikitext @@ -23519,7 +23618,7 @@ comment Bad images - basic functionality !! wikitext [[File:Bad.jpg]] -!! DISABLED/html/php +!! html/php+disabled !! html/parsoid !! end @@ -23530,7 +23629,7 @@ Bad images - T18039: text after bad image disappears Foo bar [[File:Bad.jpg]] Bar foo -!! DISABLED/html/php +!! html/php+disabled
- Foo
+- bar
Foo bar
Bar foo
@@ -23708,13 +23807,13 @@ showindicators[[Main Page]] [[File:Foobar.jpg|25px|link=]] [[File:Foobar.jpg|25px]] -* foo -* bar +*foo +*bar foo Preformatted Broken tag{| class=wikitable -| cell +|cell |} Two @@ -23724,8 +23823,8 @@ paragraphs 02=Main Page 03= 04= -05=+05=
- foo
-- bar
06=foo 07=
- foo
+- bar
Preformatted @@ -23734,7 +23833,7 @@ paragraphs 09=10=
- cell + cell Two @@ -24001,7 +24100,7 @@ T28375: TOC with italics title=[[Main Page]] !! wikitext __TOC__ -== ''Lost'' episodes == +==''Lost'' episodes== !! html/php
Contents
@@ -24013,7 +24112,7 @@ __TOC__ !! html/parsoid -
Lost episodes
+Lost episodes
!! end !! test @@ -24022,7 +24121,7 @@ T28375: TOC with bold title=[[Main Page]] !! wikitext __TOC__ -== '''should be bold''' then normal text == +=='''should be bold''' then normal text== !! html/phpContents
@@ -24034,7 +24133,7 @@ __TOC__ !! html/parsoid -
should be bold then normal text
+should be bold then normal text
!! end !! test @@ -24043,7 +24142,7 @@ T35845: Headings become cursive in TOC when they contain an image title=[[Main Page]] !! wikitext __TOC__ -== Image [[Image:foobar.jpg]] == +==Image [[Image:foobar.jpg]]== !! html/phpContents
@@ -24055,7 +24154,7 @@ __TOC__ !! html/parsoid -
Image
+Image
!! end !! test @@ -24064,7 +24163,7 @@ T35845 (2): Headings become bold in TOC when they contain a blockquote title=[[Main Page]] !! wikitext __TOC__ -==Quote== +==Quote== !! html/phpContents
@@ -24084,7 +24183,7 @@ __TOC__
!! html/parsoid -
[edit]Quote
+
Quote!! end !! test @@ -24095,7 +24194,7 @@ wgFragmentMode=[ 'html5', 'legacy' ] title=[[Main Page]] !! wikitext __TOC__ -== Proof: 2 < 3 == +==Proof: 2 < 3== Hanc marginis exiguitas non caperet. QED !! html/php @@ -24111,7 +24210,7 @@ QED !! html/parsoid -
QuoteProof: 2 < 3
+Proof: 2 < 3
Hanc marginis exiguitas non caperet. QED
!! end @@ -24120,9 +24219,9 @@ QED Multiple tags in TOC !! wikitext __TOC__ -== Foo Bar == +==Foo Bar== -== FooBar== +==FooBar== !! html/phpContents
@@ -24146,9 +24245,9 @@ __TOC__
Foo
!! html/parsoid -[edit]Bar
Foo Bar
+Foo Bar
-Foo
+BarFoo
!! end # Don't expect Parsoid to roundtrip this until the php parser comes closer to @@ -24159,9 +24258,9 @@ Tags with parameters in TOC parsoid=wt2html !! wikitext __TOC__ -== Hello == +==Hello== -== Evilbye == +==Evilbye== !! html/phpBarContents
@@ -24175,24 +24274,24 @@ __TOC__ !! html/parsoid -
Hello
+Hello
-b">Evilbye
+b">Evilbye
!! end !! test span tags with directionality in TOC !! wikitext __TOC__ -== C++ == +==C++== -== ××× ×! == +==××× ×!== -== The attributes on these span tags must be deleted from the TOC == +==The attributes on these span tags must be deleted from the TOC== -== All attributes on these span tags must be deleted from the TOC == +==All attributes on these span tags must be deleted from the TOC== -== Attributes after dir on these span tags must be deleted from the TOC == +==Attributes after dir on these span tags must be deleted from the TOC== !! html/phpContents
@@ -24212,18 +24311,18 @@ __TOC__ !! html/parsoid -
C++
-××× ×!
-The attributes on these span tags must be deleted from the TOC
-All attributes on these span tags must be deleted from the TOC
-Attributes after dir on these span tags must be deleted from the TOC
+C++
+××× ×!
+The attributes on these span tags must be deleted from the TOC
+All attributes on these span tags must be deleted from the TOC
+Attributes after dir on these span tags must be deleted from the TOC
!! end !! test T74884: bdi element in ToC !! wikitext __TOC__ -== test == +==test== !! html/phpContents
@@ -24235,14 +24334,14 @@ __TOC__ !! html/parsoid -
test
+test
!! end !! test T35715: s/strike element in ToC !! wikitext __TOC__ -==testtesttest== +==testtesttest== !! html/phpContents
@@ -24254,14 +24353,14 @@ __TOC__ !! html/parsoid -
+
testtesttest!! end !! test Empty
testtesttesttag in TOC, removed by Sanitizer (T92892) !! wikitext __TOC__ -== x == +==x== !! html/php
Contents
@@ -24273,7 +24372,7 @@ __TOC__ !! html/parsoid -
x
+x
!! end !! article @@ -24425,17 +24524,17 @@ new support for bdi element (T33817) Ignore pipe between table row attributes !! wikitext {| -| quux +|quux |- id=foo | style='color: red' -| bar +|bar |} !! html!! end @@ -24491,6 +24590,17 @@ abc abc !! end +!! test +Padleft and padright with non-numerical length (T180403) +!! wikitext +{{padleft:abcdef|junk}} +{{padright:abcdef|junk}} +!! html/php +
- quux + quux - bar + bar abcdef +abcdef +
+!! end + !!test Special parser function !! wikitext @@ -24541,11 +24651,11 @@ Disable TOC notoc !! wikitext Lead -== Section 1 == -== Section 2 == -== Section 3 == -== Section 4 == -== Section 5 == +==Section 1== +==Section 2== +==Section 3== +==Section 4== +==Section 5== !! htmlLead
@@ -24715,6 +24825,7 @@ Empty LI and TR nodes should not be stripped from top-level content * a * * b + {| |- |- @@ -25670,9 +25781,9 @@ parsoid=html2wt !! html/php!! end @@ -26562,12 +26673,12 @@ parsoid=wt2html,html2html Accept empty td cell attribute !! wikitext {| -| align="center" | foo || | +| align="center" |foo|| | |} !! html
- <foo + <foo -bar> + bar> @@ -26577,13 +26688,13 @@ Accept empty td cell attribute Non-empty attributes in th-cells !! wikitext {| -! Foo !! style="color: red" | Bar +!Foo!! style="color: red" |Bar |} !! html
- foo +foo !!end @@ -26592,13 +26703,13 @@ Non-empty attributes in th-cells Accept empty attributes in th-cells !! wikitext {| -!| foo !!| bar +!|foo!!|bar |} !! html
- Foo -Bar + Foo +Bar !!end @@ -26607,17 +26718,17 @@ Accept empty attributes in th-cells Empty table rows go away !! wikitext {| -| Hello -| there +|Hello +|there |- class="foo" |- |} !! html
- foo -bar + foo +bar @@ -26759,13 +26870,13 @@ Indent and comment before table row !! wikitext {| |- - | there + |there |} !! html/php
- Hello + Hello -there + there !! html/parsoid @@ -27698,7 +27809,7 @@ parsoid=html2wt !! html/parsoid
- there + there !! wikitext -* a
- a
b- c
b +* a
b * c !! end @@ -28398,9 +28509,9 @@ parsoid=html2wt,wt2wt |- |- |- -|
+|
- -|
+|
- |} !! html/php+tidy @@ -28853,7 +28964,7 @@ parsoid={ !! html/parsoidfoo
!! wikitext -== foo
bar
bar == +== foo
bar == !! end !! test @@ -29384,6 +29495,64 @@ y }} !! end +!! test +New list is serialized on newlines +!! options +parsoid=html2wt +!! html/parsoid +The quick brown fox jumps over the lazy dog.
+
- Yesterday
+- Today
+- Tomorrow
+The quick onyx goblin jumps over the lazy dwarf.
+!! wikitext +The quick brown fox jumps over the lazy dog. + +* Yesterday +* Today +* Tomorrow + +The quick onyx goblin jumps over the lazy dwarf. +!! end + +!! test +New lists in formatting elements serialized w/o newlines +!! options +parsoid=html2wt +!! html/parsoid + + ++
+ + + +- 123
++!! wikitext + +* 123 + + + +* hi + +!! end + +!! test +New list in table doesn't need newlines +!! options +parsoid=html2wt +!! html/parsoid +
- hi
+!! wikitext +{| +| +* test +* 123 +|} +!! end + # --------------------------------------------------- # End of tests spec'ing wikitext serialization norms | # --------------------------------------------------- @@ -29563,15 +29732,15 @@ parsoid={ !! test Empty LI (T49673) !! wikitext -* a +*a * * -* b +*b !! html+tidy -
- test
- 123
!! end !! test @@ -29696,14 +29865,14 @@ Decoding of HTML entities in headings and links for IDs and link fragments (T103 !! config wgFragmentMode=[ 'html5', 'legacy' ] !! wikitext -== A&B&C&D&amp;E == +==A&B&C&D&amp;E== [[#A&B&C&D&amp;E]] !! html/php
- a
-- +
+
- a
+ -- b
- b
A&B&C&D&amp;E[edit]
!! html/parsoid -A&B&C&D&amp;E
+A&B&C&D&amp;E
!! end @@ -29712,7 +29881,7 @@ Decoding of HTML entities in headings and links for IDs and link fragments (T103 !! config wgFragmentMode=[ 'legacy' ] !! wikitext -== A&B&C&D&amp;E == +==A&B&C&D&amp;E== [[#A&B&C&D&amp;E]] !! html/phpA&B&C&D&amp;E[edit]
@@ -29765,17 +29934,17 @@ HTML5 ids: fallback to legacy !! config wgFragmentMode=[ 'html5', 'legacy' ] !! wikitext -== Foo bar == +==Foo bar== -== foo Bar == +==foo Bar== -== ТеÑÑ == +==ТеÑÑ== -== ТеÑÑ == +==ТеÑÑ== -== ÑеÑÑ == +==ÑеÑÑ== -== Hey < # " > % : ' == +==Hey < # " > % : '== [[#Foo bar]] [[#foo Bar]] [[#ТеÑÑ]] [[#ÑеÑÑ]] [[#Hey < # " > % : ']] {{anchorencode:ð©}} @@ -29806,20 +29975,20 @@ wgFragmentMode=[ 'html5', 'legacy' ] !! html/parsoid -Foo bar
+Foo bar
-foo Bar
+foo Bar
-ТеÑÑ
+ТеÑÑ
-ТеÑÑ
+ТеÑÑ
-ÑеÑÑ
+ÑеÑÑ
-Hey < # " > %Â : '
+Hey < # " > %Â : '
#Foo bar #foo Bar #ТеÑÑ #ÑеÑÑ #Hey < # " > % : '
-ð©
+ð©
@@ -29831,17 +30000,17 @@ HTML5 ids: legacy with a fallback to modern !! config wgFragmentMode=[ 'legacy', 'html5' ] !! wikitext -== Foo bar == +==Foo bar== -== foo Bar == +==foo Bar== -== ТеÑÑ == +==ТеÑÑ== -== ТеÑÑ == +==ТеÑÑ== -== ÑеÑÑ == +==ÑеÑÑ== -== Hey < # " > % : ' == +==Hey < # " > % : '== [[#Foo bar]] [[#foo Bar]] [[#ТеÑÑ]] [[#ÑеÑÑ]] [[#Hey < # " > % : ']] {{anchorencode:ð©}} @@ -29879,17 +30048,17 @@ HTML5 ids: no legacy !! config wgFragmentMode=[ 'html5' ] !! wikitext -== Foo bar == +==Foo bar== -== foo Bar == +==foo Bar== -== ТеÑÑ == +==ТеÑÑ== -== ТеÑÑ == +==ТеÑÑ== -== ÑеÑÑ == +==ÑеÑÑ== -== Hey < # " > % : ' == +==Hey < # " > % : '== [[#Foo bar]] [[#foo Bar]] [[#ТеÑÑ]] [[#ÑеÑÑ]] [[#Hey < # " > % : ']] {{anchorencode:ð©}} @@ -29926,13 +30095,16 @@ T90902: Normalize weird characters in section IDs !! config wgFragmentMode=[ 'html5', 'legacy' ] !! wikitext -== Foo bar == +==Foo bar== [[#Foo bar]] !! html/phpFoo bar[edit]
+!! html/parsoid +Foo bar
+ !! end !! test @@ -29988,40 +30160,40 @@ parsoid={ "wrapSections": true } !! wikitext -= 1 = +=1= a -= 2 = +=2= b -== 2.1 == +==2.1== c -== 2.2 == +==2.2== d -=== 2.2.1 === +===2.2.1=== e -= 3 = +=3= f !! html/parsoid -1
+1
a
-2
+2
b
-2.1
+2.1
c
-2.2
+2.2
d
-2.2.1
+2.2.1
e
-3
+@@ -30040,13 +30212,13 @@ Para 2 with a 3
f
nested in itPara 3. -= 1 = +=1= a -= 2 = +=2= b -== 2.1 == +==2.1== c !! html/parsoidPara 1.
@@ -30055,13 +30227,13 @@ cPara 3.
-1
+1
a
-2
+2
b
-@@ -30074,29 +30246,29 @@ parsoid={ "wrapSections": true } !! wikitext -= 1 = +=1= a {{echo|1= -== 1.1 == +==1.1== b }} -== 1.2 == +==1.2== c -= 2 = +=2= d !! html/parsoid - 2.1
+2.1
c
1
+1
a
-1.1
+1.1
b
-1.2
+1.2
c
-2
+!! end @@ -30110,26 +30282,26 @@ parsoid={ "modes": ["wt2html", "wt2wt"] } !! wikitext -= 1 = +=1= a {{echo|1= -== 1.1 == +==1.1== b -=== 1.1.1 === +===1.1.1=== d }} -= 2 = +=2= e !! html/parsoid - 2
d
1
+1
a
-1.1
+1.1
b
-1.1.1
+1.1.1
d
-2
+!! end @@ -30143,32 +30315,32 @@ parsoid={ "modes": ["wt2html", "wt2wt"] } !! wikitext -= 1 = +=1= a {{echo|1= x -== 1.1 == +==1.1== b ==1.2== c ===1.2.1=== d }} -= 2 = +=2= e !! html/parsoid 2
e
1
a
-x
-1.1
+x
+1.1
b
1.2
c
1.2.1
d
-2
+!! end @@ -30187,7 +30359,7 @@ parsoid={ a {{echo| -= 1 = +=1= b }} @@ -30197,8 +30369,8 @@ c 2
e
a
- -1
+ +1
b
@@ -30217,32 +30389,32 @@ parsoid={ "wrapSections": true } !! wikitext -= 1 = +=1= a {{echo|1= -= 2 = +=2= b -== 2.1 == +==2.1== c }} d -= 3 = +=3= e !! html/parsoid -1
+1
a
-2
+2
b
-2.1
+2.1
c
d
-3
+!! end @@ -30260,31 +30432,31 @@ parsoid={ "modes": ["wt2html", "wt2wt"] } !! wikitext -= 1 = +=1= a {{echo|1= -== 1.2 == +==1.2== b -= 2 = +=2= c }} d -= 3 = +=3= e !! html/parsoid - 3
e
1
+1
a
-1.2
+1.2
b
-2
+2
c
d
-3
+!! end @@ -30298,39 +30470,39 @@ parsoid={ foo 3
e
-= 1 = +=1= a -== 1.1 == +==1.1== b -= 2 = +=2= c-= 3 = +=3= d -== 3.1 == +==3.1== e !! html/parsoidfoo
--1
+1
a
-1.1
+1.1
b
-2
+2
c
3
+3
d
-!! end @@ -30344,44 +30516,44 @@ parsoid={ !! wikitext foo -= 1 = +=1= a 3.1
+3.1
e
b -== 1.1 == +==1.1== c -= 2 = +=2= de -= 3 = +=3= f -== 3.1 == +==3.1== g !! html/parsoidfoo
-1
+1
a
b
-1.1
+1.1
c
-2
+2
d
e
-3
+3
f
-!! end @@ -30397,21 +30569,21 @@ foo 3.1
+3.1
g
a
-= b = +=b=c
-= d = +=d= !! html/parsoidfoo
a
-b
+b
c
-+ d
!! end !! test @@ -30423,18 +30595,18 @@ parsoid={ !! wikitext -= 1 = +=1= a -= 2 = +=2= b !! html/parsoid d
- 1
+1
a
-2
+!! end @@ -30447,15 +30619,211 @@ parsoid={ !! wikitext foo {{echo| 2
b
-== a == -== b == +==a== +==b==}} !! html/parsoidfoo
- -a
-b
+!! end + +########################################################################## +Tests demonstrating white-space insensitivity in input wikitext +for wikitext headings, wikitext list items, and wikitext table captions, +headings, and cells. HTML versions of the same should preserve whitespace. +########################################################################## +!! test +Trim whitespace in wikitext headings, list items, table captions, headings, and cells +!! wikitext +__NOTOC__ +== Spaces == +== Tabs == +* List item +; term : definition +{| +|+ Table Caption +|- +! Table Heading 1 !! Table Heading 2 +|- +| Table Cell 1 || Table Cell 2 +|- +| class="foo" || Table Cell 3 +|- +| testing [[one|two]] | some content +|} +: {| + | Table Cell 1 || Table Cell 2 + |} foo +!! html/php+tidy + +a
+b
Spaces[edit]
+Tabs[edit]
++
- List item
+
- term
+- definition
+
+Table Caption + ++ +Table Heading 1 +Table Heading 2 + + +Table Cell 1 +Table Cell 2 + + +class="foo" +Table Cell 3 + + testing two | some content + +!! end + +# Looks like
+
foo+ Table Cell 1 +Table Cell 2 + is not accepted in HTML +!! test +Do not trim whitespace in HTML headings, list items, table captions, headings, and cells +!! wikitext +__NOTOC__ + Heading
++
- List item
+
+!! html/php+tidy ++ Table Heading + Table Cell Heading
++
- List item
+
+!! end + +!! test +Do not trim whitespace in links and quotes +!! wikitext +foo '' italic '' and ''' bold ''' +[[Foo| some text ]] +!! html/php+tidy ++ Table Heading + Table Cell foo italic and bold + some text +
+!! end + +!! test +Remove p tags surrounding a single element in a figcaption +!! options +parsoid=html2wt +!! wikitext +[[File:Foobar.jpg|right|200x200px|Caption]] +!! html/parsoid + +!! end + +!! test +Selser preserves lack of newline before list and allows newline after the list +!! options +parsoid={ + "modes": ["selser"], + "scrubWikitext": true, + "changes": [ + [ "ul", "after", "footer
" ] + ] +} +!! wikitext +header +*foo +*bar +!! wikitext/edited +header +*foo +*bar + +footer +!! end + + +!! test +Selser does not introduce newlines between unedited paragraph preceding the list +!! options +parsoid={ + "modes": ["selser"], + "changes": [ + [ "table tbody tr td p:last-child", "empty" ] + ] +} +!! wikitext +{| +| +header +*foo +*bar +footer +|} +!! wikitext/edited +{| +| +header +*foo +*bar + +|} +!! end + +!! test +Selser does not introduce newlines between unedited paragraph following the list +!! options +parsoid={ + "modes": ["selser"], + "changes": [ + [ "table tbody tr td p:first-child", "empty" ] + ] +} +!! wikitext +{| +| +header +*foo +*bar +footer +|} +!! wikitext/edited +{| +| + +*foo +*bar +footer +|} +!! end + +!! test +Remove a list item but do not insert newline above list +!! options +parsoid={ + "modes": ["selser"], + "changes": [ + [ "ul li:last-child", "remove" ] + ] +} +!! wikitext +header +*foo +*bar +footer +!! wikitext/edited +header +*foo +footer +!! end