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 B -C == +==A B +C== !! html/php

A B @@ -543,8 +543,8 @@ C[ A B -C

+C">A B +C !! end !! test @@ -560,48 +560,48 @@ http://fr.wikipedia.org/wiki/🍺 !! test Simple list !! wikitext -* Item 1 -* Item 2 +*Item 1 +*Item 2 !! html - + !! end !! test Italics and bold !! wikitext -* plain -* plain''italic''plain -* plain''italic''plain''italic''plain -* plain'''bold'''plain -* plain'''bold'''plain'''bold'''plain -* plain''italic''plain'''bold'''plain -* plain'''bold'''plain''italic''plain -* plain''italic'''bold-italic'''italic''plain -* plain'''bold''bold-italic''bold'''plain -* plain'''''bold-italic'''italic''plain -* plain'''''bold-italic''bold'''plain -* plain''italic'''bold-italic'''''plain -* plain'''bold''bold-italic'''''plain -* plain l'''italic''plain -* plain l''''bold''' plain -!! html - +*plain +*plain''italic''plain +*plain''italic''plain''italic''plain +*plain'''bold'''plain +*plain'''bold'''plain'''bold'''plain +*plain''italic''plain'''bold'''plain +*plain'''bold'''plain''italic''plain +*plain''italic'''bold-italic'''italic''plain +*plain'''bold''bold-italic''bold'''plain +*plain'''''bold-italic'''italic''plain +*plain'''''bold-italic''bold'''plain +*plain''italic'''bold-italic'''''plain +*plain'''bold''bold-italic'''''plain +*plain l'''italic''plain +*plain l''''bold''' plain +!! html + !! end @@ -1247,32 +1247,33 @@ Text-level semantic html elements in wikitext !! test Ruby markup (W3C-style) !! wikitext -; Mono-ruby for individual base characters -: 日に本ほん語ご -; Group ruby -: 今日きょう -; Jukugo ruby -: 法華経ほけきょう -; Inline ruby -: 東京(とうきょう) -; Double-sided ruby -: 旧金山jiùjīnshānSan Francisco +;Mono-ruby for individual base characters +:日に本ほん語ご +;Group ruby +:今日きょう +;Jukugo ruby +:法華経ほけきょう +;Inline ruby +:東京(とうきょう) +;Double-sided ruby +:旧金山jiùjīnshānSan Francisco + ♥HeartCœur ☘ShamrockTrèfle ✶StarÉtoile !! html -
Mono-ruby for individual base characters
-
日に本ほん語ご
-
Group ruby
-
今日きょう
-
Jukugo ruby
-
法華経ほけきょう
-
Inline ruby
-
東京(とうきょう)
-
Double-sided ruby
-
旧金山jiùjīnshānSan Francisco
+
Mono-ruby for individual base characters
+
日に本ほん語ご
+
Group ruby
+
今日きょう
+
Jukugo ruby
+
法華経ほけきょう
+
Inline ruby
+
東京(とうきょう)
+
Double-sided ruby
+
旧金山jiùjīnshānSan Francisco

♥HeartCœur ☘ShamrockTrèfle @@ -2288,6 +2289,11 @@ Foo bar baz quux

+!! html+tidy +
+

Foo bar baz quux +

+
!! end !! test @@ -2300,7 +2306,7 @@ T17491: / in blockquote (2) !! html+tidy -

Foo

bar baz

quux +

Foo bar baz quux

!! end @@ -2751,7 +2757,7 @@ Templates: Strip leading and trailing whitespace from named-param values

b

c

-
  • d
+
  • 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


-
  • f
+
  • f


g
@@ -3168,15 +3174,15 @@ c
 2c. Indent-Pre and tables (T44252)
 !! wikitext
 {|
- |+ foo
- !  | bar
+ |+foo
+ !  |bar
 |}
 !! html
 
-
-
foo +foo
bar +bar
!!end @@ -3186,14 +3192,14 @@ c !! wikitext a {| - | b + |b |} !! html/php
a
 
-
b +b
!! html/parsoid @@ -3699,19 +3705,19 @@ HTML-pre: 3: other wikitext !! test Simple definition !! wikitext -; name : Definition +;name :Definition !! html -
name 
-
Definition
+
name 
+
Definition
!! end !! test Definition list for indentation only !! wikitext -: Indented text +:Indented text !! html -
Indented text
+
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 -
http://example.com/ 
-
definition
+
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 -
Help:FAQ
-
The least-read page on Wikipedia
+
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 -
news:alt.wikipedia.rox
-
This isn't even a real newsgroup!
+
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 -- don't crash or enter an infinite loop
+
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 -
Wikipedia : The Next Generation
-
OK, I made that up
+
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
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
onetwo
@@ -3853,14 +3859,14 @@ T13748: Literal closing tags Definition and unordered list using wiki syntax nested in unordered list using html tags. !! wikitext
  • -; term : description -* unordered +;term :description +*unordered
!! 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
+
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 +
+ + +
foo +bar +
this text should be part of the dl
+!! html/parsoid +
+ + +
foo +bar +
this text should be part of the dl
+!! 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
- -
a -
  • b
+
a +
  • b
c -
  • d
+
c +
  • d
!! 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 -
  • foo
  • -
  • bar
-
baz
+
  • foo
  • +
  • bar
+
baz
!! html/php+tidy -
  • foo
  • -
  • bar
-
baz
+
  • foo
  • +
  • bar
+
baz
!! html/parsoid
    -
  • foo +
  • foo
    -
  • bar +
  • bar
-
baz
+
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 -
  • d1
    -
    d2
+
  • 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
+
d2
!! end @@ -4254,10 +4286,10 @@ Definition Lists: Mixed Lists: Test 5 Definition Lists: Mixed Lists: Test 6 !! wikitext #*:d1 -#*::: d3 +#*:::d3 !! html
    • d1 -
      d3
+
d3
!! end @@ -4265,11 +4297,11 @@ Definition Lists: Mixed Lists: Test 6 !! test Definition Lists: Mixed Lists: Test 7 !! wikitext -:* d1 -:* d2 +:*d1 +:*d2 !! html -
  • d1
  • -
  • d2
+
  • 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 -
    1. foo 
      -
      • bar (who uses this?)
+
    1. foo 
      +
      • bar (who uses this?)
!! html/parsoid
  • @@ -4402,8 +4434,8 @@ Definition Lists: Weird Ones: Test 1
    -
    foo 
    -
    bar (who uses this?)
    +
    foo 
    +
    bar (who uses this?)
    @@ -4460,29 +4492,29 @@ Definition Lists: colons occurring in tags Definition Lists: colons and tables 1 !! wikitext :{| -| x +|x |} :{| -| y +|y |} !! html/php
    -
    x +x
    -
    y +y
    !! html/parsoid
    -
    x +x
    -
    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

    http://[2404:130:0:1000::187:2]/index.php

    Examples from RFC 2373, section 2.2:

    - +

    Examples from RFC 2732, section 2:

    - + !! html/parsoid

    http://[2404:130:0:1000::187:2]/index.php

    Examples from RFC 2373, section 2.2:

    - +

    Examples from RFC 2732, section 2:

    - + !! 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

    test

    Examples from RFC 2373, section 2.2:

    - +

    Examples from RFC 2732, section 2:

    - + !! html/parsoid

    test

    Examples from RFC 2373, section 2.2:

    - +

    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 -
    caption +caption
    !! html/parsoid -
    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 - -
    caption1 +caption1
    foo +foo
    !! 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 |} !! html - -
    caption2 caption3 +caption3
    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 - - - + - - - +
    baz +baz foo bar foo baz +foo bar foobaz baz +baz style='color:red;' baz +style='color:red;'baz
    !! end @@ -6067,19 +6101,19 @@ Table td-cell syntax variations Simple table !! wikitext {| -| 1 || 2 +|1||2 |- -| 3 || 4 +|3||4 |} !! html - - + - - +
    1 2 +12
    3 4 +34
    !! end @@ -6088,17 +6122,17 @@ Simple table Simple table but with multiple dashes for row wikitext !! wikitext {| -| foo +|foo |----- -| bar +|bar |} !! html - -
    foo +foo
    bar +bar
    !! 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 - - - - + + + - - - - + + - - - - + + - - - - + + - - - - + + - - - - + +
    Multiplication table
    × 1 2 3 +×123
    1 +1 1 2 3 +123
    2 +2 2 4 6 +246
    3 +3 3 6 9 +369
    4 +4 4 8 12 +4812
    5 +5 5 10 15 +51015
    !! end @@ -6178,13 +6212,13 @@ Multiplication table Accept "||" in table headings !! wikitext {| -!h1 || h2 +!h1||h2 |} !! html - - +
    h1 h2 +h1h2
    !! end @@ -6193,12 +6227,12 @@ Accept "||" in table headings Accept "!!" in table data !! wikitext {| -| Foo!! || +|Foo!!|| |} !! html - +
    Foo!! Foo!!
    @@ -6212,13 +6246,13 @@ Accept "!!" in table data Accept "||" in indented table headings !! wikitext :{| -!h1 || h2 +!h1||h2 |} !! html
    - - +
    h1 h2 +h1h2
    !! end @@ -6293,9 +6327,9 @@ Accept empty attributes in td/th cells (td/th cells starting with leading ||) !! html - -
    h1 +h1 a +a
    !! end @@ -6305,13 +6339,13 @@ Accept "| !" at start of line in tables (ignore !-attribute) !! wikitext {| |- -| !style="color:red" | bar +|!style="color:red"|bar |} !! html -
    bar +bar
    !!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 -1 - 1 - 2 - 3 +1 +2 +3 - 1 -+2 +1 ++2 -3 - +1 ++1 - -1 +-1 !!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 - - - - -
    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
    !! end @@ -6399,7 +6433,7 @@ Nested table !! html - - +
    α +α @@ -6444,7 +6478,7 @@ Table cell attributes: Pipes protected by nowikis should be treated as a plain c -
    bar title="foo|" bar +title="foo|" bar
    !! html/parsoid @@ -6484,17 +6518,17 @@ parsoid=wt2html,html2html Element attributes with double ! should not be broken up by
    !! wikitext {| -! hi
    ha
    ho +!hi
    ha
    ho |} !! html/php -
    hi
    ha
    ho +
    hi
    ha
    ho
    !! html/parsoid - +
    hi
    ha
    ho
    hi
    ha
    ho
    !! end @@ -6502,17 +6536,17 @@ Element attributes with double ! should not be broken up by
    ! and || in element attributes should not be parsed as / !! wikitext {| -|
    hi
    +|
    hi
    |} !! html/php -
    hi
    +
    hi
    !! html/parsoid - +
    hi
    hi
    !! end @@ -6523,18 +6557,18 @@ Element attributes with double ! should not be broken up by
    parsoid=wt2html !! wikitext {| -| style="color: red !important;" data-contrived="put this here ||" | foo +|style="color: red !important;" data-contrived="put this here ||"|foo |} !! html/php - - +
    style="color: red !important;" data-contrived="put this here foo +style="color: red !important;" data-contrived="put this herefoo
    !! html/parsoid - +
    style="color: red !important;" data-contrived="put this here foo
    style="color: red !important;" data-contrived="put this herefoo
    !! 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 - -
    1 +1 2 +2
    !! html/parsoid - - + +
    1 212
    !! end @@ -6640,7 +6674,7 @@ parsoid={
    Foo style="color:red;"style="color:red;" Bar Foo @@ -6754,14 +6788,14 @@ parsoid=wt2html,html2html {| |- -! foo +!foo |} !! html/* -
    foo +foo
    !! 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 -
    hello +hello
    !! 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 -
    foo +foo
    @@ -6834,18 +6868,18 @@ Wikitext table comments represented in parsoid dom !! wikitext {| |- -| x +|x |} !! html/php+tidy -
    x +x
    !! html/parsoid - +
    x
    x
    !! end @@ -6871,14 +6905,14 @@ Table cell with a single comment !! wikitext {| | -| a +|a |} !! html -
    a +a
    !! end @@ -6889,21 +6923,21 @@ Table-cell after a comment-only-empty-line {| |a -| b +|b |} !! html -
    a b +b
    !! 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 - - - - +
    header +header second header +second header
    data second data +datasecond data
    !! 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 +datasecond data
    data with | second data with | +data with |second data with |
    data with | second data with | +data with |second data with |
    !! 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 second header +headersecond header
    data linktext second data linktext +data linktextsecond data linktext
    data second data link|text with pipe +datasecond data link|text with pipe
    !! 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 - - - + +
    a b +ab
    !! html/parsoid - + !! 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
    a b
    ab
    - - + - - +
    foo bar +foobar baz quux +bazquux
    !! 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

    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
    • Common list
    • -
    • item 2
    • +
    • item 2
    • item 3
    !! end @@ -9494,21 +9529,22 @@ Numbered list !! wikitext #Numbered list #item 2 -# item 3 +#item 3 !! html
    1. Numbered list
    2. item 2
    3. -
    4. 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 -
      1. with numbers
      -
      • and bullets
      -
      1. and numbers
    • +
      1. with numbers
      +
      • and bullets
      +
      1. and numbers
    • bullets again
      • bullet level 2
        • bullet level 3 @@ -9534,43 +9570,43 @@ Mixed list
        • Number on level 3
        1. number level 2
      • Level 1 -
          • Level 3
      -
          • Level 3, but ordered
      +
        • Level 3
    +
        • Level 3, but ordered
    !! end !! test 1. Nested mixed wikitext and html list !! wikitext -* hi -*
    • ho
    -* hi -** ho +*hi +*
    • ho
    +*hi +**ho !! html/php -
    • hi
    • -
      • ho
    • -
    • hi -
      • 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|
  • ho
  • }} +;hi +:{{echo|
  • ho
  • }} !! html/php -
    hi
    -
  • ho
  • +
    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 -
        • foo
    +
        • foo
    !! end !! test Nested lists 8 (multiple nesting transitions) !! wikitext -* foo -*** bar -** baz -* boo +*foo +***bar +**baz +*boo !! html -
    • foo -
        • bar
      • -
      • baz
    • -
    • boo
    +
    • foo +
        • bar
      • +
      • baz
    • +
    • boo
    !! end @@ -9700,60 +9736,61 @@ parsoid !! test List items are not parsed correctly following a
     block (T2785)
     !! wikitext
    -* 
    foo
    -*
    bar
    -* zar +*
    foo
    +*
    bar
    +*zar !! html/php -
    • foo
    • -
    • bar
    • -
    • zar
    +
    • 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 -
    • 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
    +
    • item 0
    • +
    • notSOL
    • +
    • 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 -
    • foo
    -
      • bar
    +
    • foo
    +
      • bar

    A heading[edit]

    -
    • Another list item
    +
    • Another list item
    !!end @@ -9775,6 +9812,10 @@ Multiple list tags generated by templates
  • 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
    • not a li-hack
    !! html+tidy -
    • foo
    • -
    • li-hack
    • -
    • templated li-hack
    • -
    • unsupported li-hack with preceding comments
    +
    • foo
    • +
    • li-hack
    • +
    • templated li-hack
    • +
    • unsupported li-hack with preceding comments
    • not a li-hack
    !! html/parsoid
    • 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
        -
      1. foo
          -
        1. bar
        2. +
        3. foo
            +
          1. bar
          -
        • foo
            -
          • bar
          • +
          • foo
              +
            • bar
          -
          foo
          -
          bar
          +
          foo
          +
          bar
          !! end @@ -9908,7 +9951,7 @@ Unbalanced closing block tags break a list
          • a
        • b
        • -!! html+parsoid +!! html/parsoid
          • a
          @@ -9944,14 +9987,14 @@ Unclosed formatting tags that straddle lists are closed and reopened !! options parsoid=wt2html,wt2wt,html2html !! wikitext -# a -# b +# a +#b !! html/php+tidy -
          1. a
          2. -
          3. b
          +
          1. a
          2. +
          3. b
          !! html/parsoid -
          1. a
          2. -
          3. b
          +
          1. a
          2. +
          3. b
          !! 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

          -

          • foo

          +

          • foo

          !! html/parsoid
            -
          • foo
          • +
          • foo
          !!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 -
          • 01
          • -
          • 1
          • -
          • January
          • -
          • January
          • -
          • Jan
          • -
          • 1
          • -
          • 01
          • -
          • Thursday
          • -
          • 1970
          • -
          • 00:02
          • -
          • 00
          • -
          • 1
          • -
          • 4
          • -
          • 19700101000203
          +*{{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

          foo

          -
          • item 1
          +
          • item 1
          !! html/parsoid

          foo

          -
          • item 1
          +
          • 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 - - + - - + - - +
          testing two | three four +testing two |threefour three four +threefour testing="two" | three four +testing="two" |threefour
          !! html/parsoid - - - + + +
          testing two | three four three four testing="two" | three four
          testing two |threefourthreefourtesting="two" |threefour
          !! 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 - +
          Test One two "three" four
          Test One two "three" four
          !! end @@ -11485,12 +11528,12 @@ foo {{table}}

          - - + - - +
          1 2 +12
          3 4 +34
          !! end @@ -11505,12 +11548,12 @@ foo

          - - + - - +
          1 2 +12
          3 4 +34
          !! end @@ -11828,32 +11871,32 @@ Includes and comments at SOL !! options parsoid=wt2html,html2html !! wikitext -== hu == +==hu== some -* stuff -* here +*stuff +*here -can have stuff=== here === +can have stuff===here=== !! html/php

          hu

          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
          +
          • 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
          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+tidy

          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
          • -
          • 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
            +
            • ...should be ok
            • +
            • ...extra dashes
            • +
            • foobat...should be ok
            !! html/parsoid
              -
            • ...should be ok
            • -
            • ...extra dashes
            • -
            • foobat ...should be ok
            • +
            • ...should be ok
            • +
            • ...extra dashes
            • +
            • foobat...should be ok
            !! end @@ -12444,6 +12487,32 @@ parsoid=wt2html

            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 -
            hi +hi
            !! html/parsoid - +
            hi
            hi
            !! end @@ -13037,10 +13106,14 @@ Templates: Wiki Tables: 1a. Fostering of entire template content a
    -!! html+tidy +!! html/php+tidy a
    +!! html/parsoid +

    a

    + +
    !! end !!test @@ -15156,6 +15229,10 @@ Image: caption containing leading space
    bar
    !!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 -
    This is an example image thumbnail caption with a table
    Foo Bar
    Foo1 Bar1
    and some more text.
    +
    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 - + - +
    Foo Bar
    FooBar
    Foo1 Foo1 Bar1
    and some more text.
    !! 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/php

    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

      @@ -16431,33 +16508,33 @@ parsoid=wt2html

      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=== !! html

      Contents

        @@ -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== !! html

          Foo 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== !! html

          Contents

            @@ -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/parsoid

            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 @@ -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

            Contents

            @@ -16928,19 +17005,20 @@ __NOEDITSECTION__

            Header 1

            Header 1.1

            Header 1.2

            -

            Header 2

            +

            Header 2 +

            Header 2.1

            Header 2.2

            !! html/parsoid

            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

            !! end @@ -17104,17 +17182,17 @@ table with multiple empty attribute values parsoid=wt2html,html2html !! wikitext {| title= id= -| hi +|hi |} !! html/php -
            hi +hi
            !! 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 -
            status +status
            !!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 -

            Safe Link

            -
            " onmouseover="alert(document.cookie)" onfoo="
            +!! html/php+tidy +

            Safe Link

            " onmouseover="alert(document.cookie)" onfoo="
            !! html/parsoid

            Safe Link

            @@ -17912,12 +17989,12 @@ MSIE 6 CSS safety test: Repetition markers (T57332) Table attribute legitimate extension !! wikitext {| -!+ style="color:blue"| status +!+ style="color:blue"|status |} !! html -
            status +status
            !!end @@ -17926,12 +18003,12 @@ Table attribute legitimate extension Table attribute safety !! wikitext {| -!+ style="border-width:expression(0+alert(document.cookie))"| status +!+ style="border-width:expression(0+alert(document.cookie))"|status |} !! html -
            status +status
            !! end @@ -18241,6 +18318,27 @@ this is a '''test'''

            this is a test

            !! end +!! test +Parser hook: horizontal rule inside extension tag that outputs
            +!! wikitext
            +
            +Hello
            +
            +Goodbye +
            +!! html/php +
            +'
            +Hello
            +
            +Goodbye +' +array ( +) +
            + +!! end + ### ### (see tests/parser/parserTestsParserHook.php for the 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=

          http://__TOC__

          !! 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 - @@ -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 -
          • 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
          +*{{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 -
          Null
          -
          &#00;
          -
          FF
          -
          &#xC;
          -
          CR
          -
          &#xD;
          -
          Control (low)
          -
          &#8;
          -
          Control (high)
          -
          &#x7F; &#x9F;
          -
          Surrogate
          -
          &#xD83D;&#xDCA9;
          -
          This is an okay astral character
          -
          💩
          +
          Null
          +
          &#00;
          +
          FF
          +
          &#xC;
          +
          CR
          +
          &#xD;
          +
          Control (low)
          +
          &#8;
          +
          Control (high)
          +
          &#x7F; &#x9F;
          +
          Surrogate
          +
          &#xD83D;&#xDCA9;
          +
          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 -
          title  
          -
          def
          -
          title 
          -
          def
          +
          title  
          +
          def
          +
          title 
          +
          def
          title
          -
          def
          +
          def
          !! html/parsoid -
          title  
          def
          -
          title 
          def
          +
          title  
          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__

          +:.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/php

          Naslov[уреди]

          Ноте тхат евен ан унпротецтед хеадлине ИД ис нот аффецтед б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
          irc://{{ftp://a" onmouseover="alert('hello world');" +irc://{{ftp://a" onmouseover="alert('hello world');"
          -
          B +B
          !! html/parsoid @@ -22871,20 +22969,20 @@ language=sr !! test T2529: Uncovered bullet !! wikitext -* Foo {{bullet}} +*Foo {{bullet}} !! html -
          • Foo
          • -
          • Bar
          +
          • 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

          - - + - - +
          1 2 +12
          3 4 +34

          y

          @@ -22914,10 +23012,10 @@ y !! test T2529: Uncovered bullet in parser function result !! wikitext -* Foo {{lc:{{bullet}} }} +*Foo {{lc:{{bullet}} }} !! html -
          • Foo
          • -
          • bar
          +
          • 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

          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=Foobar.jpg 04=Foobar.jpg -05=
          • foo
          • -
          • bar
          +05=
          • foo
          • +
          • bar
          06=foo 07=
          Preformatted
          @@ -23734,7 +23833,7 @@ paragraphs
           
           09=
          -
          cell +cell
          10=

          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/php

            Contents

              @@ -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/php

              Contents

                @@ -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/php

                Contents

                  @@ -24084,7 +24183,7 @@ __TOC__

                  Quote

                  [edit]

                  !! html/parsoid -

                  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 -

                  Proof: 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== -== Foo
                  Bar
                  == +==Foo
                  Bar
                  == !! html/php

                  Contents

                    @@ -24146,9 +24245,9 @@ __TOC__

                    Foo

                    Bar

                    [edit]

                    !! html/parsoid -

                    Foo Bar

                    +

                    Foo Bar

                    -

                    Foo
                    Bar

                    +

                    Foo
                    Bar

                    !! 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/php

                    Contents

                      @@ -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/php

                      Contents

                        @@ -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/php

                        Contents

                          @@ -24235,14 +24334,14 @@ __TOC__ !! html/parsoid -

                          test

                          +

                          test

                          !! end !! test T35715: s/strike element in ToC !! wikitext __TOC__ -== test test test == +==test test test== !! html/php

                          Contents

                            @@ -24254,14 +24353,14 @@ __TOC__ !! html/parsoid -

                            test test test

                            +

                            test test test

                            !! end !! test Empty

                            tag 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 - -
                              quux +quux
                              bar +bar
                              !! 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 +

                              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== !! html

                              Lead

                              @@ -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 - -
                              <foo +<foo bar> +bar>
                              !! end @@ -26562,12 +26673,12 @@ parsoid=wt2html,html2html Accept empty td cell attribute !! wikitext {| -| align="center" | foo || | +| align="center" |foo|| | |} !! html - +
                              foo foo
                              @@ -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 Bar +FooBar
                              !!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 +foobar
                              !!end @@ -26607,17 +26718,17 @@ Accept empty attributes in th-cells Empty table rows go away !! wikitext {| -| Hello -| there +|Hello +|there |- class="foo" |- |} !! html - -
                              Hello +Hello there +there
                              @@ -26759,13 +26870,13 @@ Indent and comment before table row !! wikitext {| |- - | there + |there |} !! html/php -
                              there +there
                              !! html/parsoid @@ -27698,7 +27809,7 @@ parsoid=html2wt !! html/parsoid
                              • a
                                b
                              • c
                              !! wikitext -* a
                              b +* a
                              b * c !! end @@ -28398,9 +28509,9 @@ parsoid=html2wt,wt2wt |- |- |- -|
                              +|
                              - -|
                              +|
                              - |} !! html/php+tidy @@ -28853,7 +28964,7 @@ parsoid={ !! html/parsoid

                              foo
                              bar

                              !! wikitext -== foo
                              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
                              • +
                              + +
                              + +
                              • hi
                              +!! wikitext + +* 123 + + + +* hi + +!! end + +!! test +New list in table doesn't need newlines +!! options +parsoid=html2wt +!! html/parsoid +
                              • test
                              • 123
                              +!! 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 -
                              • a
                              • -
                              • +
                                • a
                                • +
                                • -
                                • b
                                +
                              • b
                              !! 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&amp;D&amp;amp;E == +==A&B&C&amp;D&amp;amp;E== [[#A&B&C&amp;D&amp;amp;E]] !! html/php

                              A&B&C&amp;D&amp;amp;E[edit]

                              #A&B&C&amp;D&amp;amp;E

                              !! html/parsoid -

                              A&B&C&amp;D&amp;amp;E

                              +

                              A&B&C&amp;D&amp;amp;E

                              #A&B&C&amp;D&amp;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&amp;D&amp;amp;E == +==A&B&C&amp;D&amp;amp;E== [[#A&B&C&amp;D&amp;amp;E]] !! html/php

                              A&B&C&amp;D&amp;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/php

                              Foo bar[edit]

                              #Foo bar

                              +!! html/parsoid +

                              Foo bar

                              +

                              #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

                              +

                              3

                              f

                              @@ -30040,13 +30212,13 @@ Para 2 with a
                              nested in it
                              Para 3. -= 1 = +=1= a -= 2 = +=2= b -== 2.1 == +==2.1== c !! html/parsoid

                              Para 1.

                              @@ -30055,13 +30227,13 @@ c

                              Para 3.

                              -

                              1

                              +

                              1

                              a

                              -

                              2

                              +

                              2

                              b

                              -

                              2.1

                              +

                              2.1

                              c

                              @@ -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 -

                              1

                              +

                              1

                              a

                              -

                              1.1

                              +

                              1.1

                              b

                              -

                              1.2

                              +

                              1.2

                              c

                              -

                              2

                              +

                              2

                              d

                              !! 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 -

                              1

                              +

                              1

                              a

                              -

                              1.1

                              +

                              1.1

                              b

                              -

                              1.1.1

                              +

                              1.1.1

                              d

                              -

                              2

                              +

                              2

                              e

                              !! 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

                              1

                              a

                              -

                              x

                              -

                              1.1

                              +

                              x

                              +

                              1.1

                              b

                              1.2

                              c

                              1.2.1

                              d

                              -

                              2

                              +

                              2

                              e

                              !! end @@ -30187,7 +30359,7 @@ parsoid={ a {{echo| -= 1 = +=1= b }} @@ -30197,8 +30369,8 @@ c

                              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

                              +

                              3

                              e

                              !! 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 -

                              1

                              +

                              1

                              a

                              -

                              1.2

                              +

                              1.2

                              b

                              -

                              2

                              +

                              2

                              c

                              d

                              -

                              3

                              +

                              3

                              e

                              !! end @@ -30298,39 +30470,39 @@ parsoid={ foo
                              -= 1 = +=1= a -== 1.1 == +==1.1== b -= 2 = +=2= c
                              -= 3 = +=3= d -== 3.1 == +==3.1== e !! html/parsoid

                              foo

                              -

                              1

                              +

                              1

                              a

                              -

                              1.1

                              +

                              1.1

                              b

                              -

                              2

                              +

                              2

                              c

                              -

                              3

                              +

                              3

                              d

                              -

                              3.1

                              +

                              3.1

                              e

                              !! end @@ -30344,44 +30516,44 @@ parsoid={ !! wikitext foo -= 1 = +=1= a
                              b -== 1.1 == +==1.1== c -= 2 = +=2= d
                              e -= 3 = +=3= f -== 3.1 == +==3.1== g !! html/parsoid

                              foo

                              -

                              1

                              +

                              1

                              a

                              b

                              -

                              1.1

                              +

                              1.1

                              c

                              -

                              2

                              +

                              2

                              d

                              e

                              -

                              3

                              +

                              3

                              f

                              -

                              3.1

                              +

                              3.1

                              g

                              !! end @@ -30397,21 +30569,21 @@ foo

                              a

                              -= b = +=b=

                              c

                              -= d = +=d= !! html/parsoid

                              foo

                              a

                              -

                              b

                              +

                              b

                              c

                              -

                              d

                              +

                              d

                              !! end !! test @@ -30423,18 +30595,18 @@ parsoid={ !! wikitext -= 1 = +=1= a -= 2 = +=2= b !! html/parsoid
                              -

                              1

                              +

                              1

                              a

                              -

                              2

                              +

                              2

                              b

                              !! end @@ -30447,15 +30619,211 @@ parsoid={ !! wikitext foo {{echo|
                              -== a == -== b == +==a== +==b==
                              }} !! html/parsoid

                              foo

                              -
                              -

                              a

                              -

                              b

                              +
                              +

                              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 +

                              Spaces[edit]

                              +

                              Tabs[edit]

                              +
                              • List item
                              +
                              term 
                              +
                              definition
                              + + + + + + + + + + + + +
                              Table Caption +
                              Table Heading 1Table Heading 2 +
                              Table Cell 1Table Cell 2 +
                              class="foo"Table Cell 3 +
                              testing two | some content +
                              +
                              + + +
                              Table Cell 1Table Cell 2 +
                              foo
                              +!! end + +# Looks like
    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
    + + + +
    Table Heading
    Table Cell
    +!! html/php+tidy +

    Heading

    +
    • List item
    + + + +
    Table Heading
    Table Cell
    +!! end + +!! test +Do not trim whitespace in links and quotes +!! wikitext +foo '' italic '' and ''' bold ''' +[[Foo| some text ]] +!! html/php+tidy +

    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 +

    Caption

    +!! 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