X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=blobdiff_plain;f=tests%2Fparser%2FparserTests.txt;h=e67ad6665856ebeec7838bf4adff6afed44be833;hb=6ac0682538e534a68d21e0b4a8145bcdcac90a78;hp=e6fa203419adaabb0749817cf87c371ab1b57c1b;hpb=16ef3e79c4c52aa6b74563b7eadcfc9792e7a4c4;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index e6fa203419..e67ad66658 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -279,12 +279,6 @@ Template:EmptyTRWithHTMLAttrTest !!endarticle -!! article -Template:CircularRef -!! text -{{CircularRef}} -!! endarticle - !! article Template:With: Colon !! text @@ -294,22 +288,13 @@ Template with colon ### ### Basic tests ### + !! test Blank input !! wikitext !! html !! end -!! test -CircularRef -!! wikitext -{{CircularRef}} - -!! html/parsoid -

[1]

-
  1. ↑ Error: Expansion loop detected at Template:CircularRef
-!! end - !! test Simple paragraph !! wikitext @@ -549,8 +534,8 @@ parsoid=wt2html !! config wgFragmentMode=[ 'html5', 'legacy' ] !! wikitext -== A B -C == +==A B +C== !! html/php

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

+C">A B +C !! end !! test @@ -572,58 +557,51 @@ http://fr.wikipedia.org/wiki/🍺

!! end -# Note that the html+tidy output removes the spaces after the
  • , -# which is a bug (https://sourceforge.net/p/tidy/bugs/945/, etc). -# This is an issue for all tests with lists. We intentionally do -# *not* add html+tidy clauses for these, as we don't want to -# document/test the broken behavior. (Parsoid matches the non-tidy -# output in these cases.) - !! 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 @@ -1149,8 +1127,7 @@ The ''[[Main Page]]'''s talk page. !! end !! test -Parsoid only: Quote balancing context should be restricted to td/th cells on the same wikitext line -(Requires tidy for PHP parser output to be fixed up) +Quote balancing context should be restricted to td/th cells on the same wikitext line !! options parsoid=wt2html,wt2wt !! wikitext @@ -1158,20 +1135,15 @@ parsoid=wt2html,wt2wt !''a!!''b |''a||''b |} -!! html/php+tidy +!! html+tidy - + - + - - -
    abb + ab
    -!! html/parsoid - - - -
    abab
    +b + !! end ### @@ -1275,32 +1247,32 @@ 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 @@ -1334,11 +1306,8 @@ Non-word characters don't terminate tag names (T19663, T42670, T54022)

    !! end -# There is a tidy bug here: https://sourceforge.net/p/tidy/bugs/946/ -# If the non-word-character tag made it through the sanitizer, tidy -# would munge it up. !! test -Non-word characters don't terminate tag names + tidy +Non-word characters don't terminate tag names !! wikitext a @@ -1352,12 +1321,13 @@ Non-word characters don't terminate tag names + tidy !! html+tidy -

    <blockquote|>a

    -

    <b→> doesn't terminate </b→>

    -

    <bä> doesn't terminate </bä>

    -

    <boo> doesn't terminate </boo>

    -

    <s.foo> doesn't terminate </s.foo>

    -

    <sub-ID#1>

    +

    <blockquote|>a +

    <b→> doesn't terminate </b→> +

    <bä> doesn't terminate </bä> +

    <boo> doesn't terminate </boo> +

    <s.foo> doesn't terminate </s.foo> +

    <sub-ID#1> +

    !! end ### @@ -1390,7 +1360,9 @@ parsoid=wt2html s !! html/php+tidy -

    <s.foo>s

    +

    +

    <s.foo>s +

    !! html/parsoid

    <s.foo>s

    !! end @@ -1518,7 +1490,8 @@ Entities inside template parameters !! wikitext {{echo|–}} !! html/php+tidy -

    –

    +

    – +

    !! html/parsoid

    !! end @@ -1888,6 +1861,7 @@ IE conditional comments ### ### paragraph wrapping tests ### + !! test No block tags !! wikitext @@ -1911,21 +1885,23 @@ a
    foo

    b

    !! html+tidy -

    a

    -
    foo
    -

    b

    +

    a

    foo
    +

    b +

    !! end +# Remex wraps empty tag runs with p-tags. +# Parsoid strips them out during p-wrapping. !! test No p-wrappable content !! wikitext
    x
    x
    x
    -!! html+tidy -
    x
    -
    x
    -
    x
    +!! html/php+tidy +
    x
    +
    x
    +

    x
    !! html/parsoid
    x
    x
    @@ -1954,11 +1930,9 @@ a
    foo

    b

    !! html+tidy -

    a

    -
    -

    foo

    -
    -

    b

    +

    a

    foo

    +

    b +

    !! end !! test @@ -1972,10 +1946,8 @@ a
    foo
    b
    foo
    !! html+tidy -

    a

    -
    foo
    -

    b

    -
    foo
    +

    a

    foo

    +b

    foo
    !! end !! test @@ -1989,14 +1961,8 @@ a
    foo
    b
    foo
    !! html+tidy -

    a

    -
    -

    foo

    -
    -

    b

    -
    -

    foo

    -
    +

    a

    foo

    +b

    foo

    !! end !! test @@ -2016,19 +1982,21 @@ d e x
    foo
    z !! html+tidy -
    foo
    -

    a

    -

    b c d e

    -

    x

    -
    foo
    -

    z

    +
    foo

    a +

    b +c +d e +

    +x

    foo

    z +

    !! end -# Tidy strips out the empty
    tags. Parsoid doesn't. -# So, we have a separate section for Parsoid. We don't want -# to mimic this stripping behavior in Parsoid. It affects -# editing experience and also requires us to maintain additional -# info for RT-ing. +# The difference between Parsoid & Remex here +# is because of Parsoid's Tidy-emulation code +# for p-wrapping. We'll start work to remove this +# emulation code in Parsoid sooner than later. +# Remex wraps empty tag runs with p-tags. +# Parsoid strips them out in a separate pass. !! test Empty lines between lines with block tags !! wikitext @@ -2058,14 +2026,16 @@ b
    e
    !! html+tidy -


    -

    a

    -

    b

    -
    a
    -

    b

    -
    b
    -

    d

    -


    +
    +


    +

    +

    a +

    b +

    +
    a

    b +

    b

    d +


    +

    e
    !! html/parsoid
    @@ -2082,7 +2052,6 @@ b
    e
    !! end -## PHP parser emits output which is broken !! test Unclosed HTML p-tags should be handled properly !! wikitext @@ -2091,11 +2060,10 @@ a b !! html/php+tidy -
    -

    foo

    -
    -

    a

    -

    b

    +

    foo

    +

    a +

    b +

    !! html/parsoid

    foo

    a

    @@ -2128,9 +2096,55 @@ parsoid=wt2html

    a

    !! end +!! test +No paragraph necessary for SOL transparent template +!! wikitext +
    foo
    +[[Category:Foo]] + +
    foo
    +{{echo|[[Category:Foo]]}} +!! html/php +
    foo
    +
    foo
    + +!! html/parsoid +
    foo
    + + +
    foo
    + +!! end + +!! test +Avoid expanding multiline sol transparent template ranges unnecessarily +!! wikitext +hi + + +{{echo|
    +}} + +[[Category:Ho]] +!! html/php +

    hi +


    +
    +

    +!! html/parsoid +

    hi

    + +


    +
    +

    + + +!! end + ### ### Preformatted text ### + !! test Preformatted text !! wikitext @@ -2276,9 +2290,6 @@ Foo bar baz quux !! end -# Note that the p-wrapping is newline sensitive, which could be -# considered a bug: tidy will wrap only the 'Foo' in the example -# below in a

    tag. (see comment 23-25 of T8200) !! test T17491: / in blockquote (2) !! wikitext @@ -2289,9 +2300,8 @@ T17491: / in blockquote (2) !! html+tidy -

    -

    Foo

    -bar baz quux
    +

    Foo

    bar baz

    quux +

    !! end !! test @@ -2426,7 +2436,6 @@ parsoid=wt2html

    !! end -# Parsoid doesn't strip empty tags, like Tidy does. !! test Empty pre; pre inside other HTML tags (T56946) !! wikitext @@ -2436,20 +2445,12 @@ a foo
    
    -!! html/php
    +!! html/php+tidy
     

    a

    -
    -foo
    +
    foo
     
    
    -
    -!! html/php+tidy
    -

    a

    -
    -
    -foo
    -
    !! html/parsoid

    a

    @@ -2469,16 +2470,12 @@ HTML pre followed by indent-pre
    !! end -# Note that tidy removes the empty

    tags from the start and end. -# Parsoid does not, by design. !! test Block tag pre !! wikitext

    foo

    !! html/php+tidy -
    -foo
    -
    +

    foo

    !! html/parsoid

    foo

    !! end @@ -2641,10 +2638,8 @@ parsoid=wt2html <pre
    !! html/php+tidy -
    -x
    -
    -

    <pre

    +
    x
    +<pre
    !! html/parsoid
    x
    @@ -2694,6 +2689,17 @@ parsoid=wt2html !! end +!! test +Self-closed pre +!! wikitext +
    +!! html/php
    +
    
    +
    +!! html/parsoid
    +
    
    +!! end
    +
     !! test
     Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
     !! options
    @@ -2745,7 +2751,7 @@ Templates: Strip leading and trailing whitespace from named-param values
     

    b

    c

    -
    • d
    +
    • d
    !! end @@ -2766,7 +2772,7 @@ Templates: Don't strip whitespace from positional-param values e}} {{echo| -* f}} +*f}} {{echo| }}g @@ -2786,7 +2792,7 @@ Templates: Don't strip whitespace from positional-param values


    -
    • f
    +
    • f


    g
    @@ -2938,7 +2944,8 @@ Templates: Parsoid parameter escaping test 1
     !! wikitext
     {{echo|[foo]|{{echo|[bar]}}}}
     !! html/php+tidy
    -

    [foo]

    +

    [foo] +

    !! html/parsoid

    [foo]

    @@ -2949,9 +2956,10 @@ Parsoid: Pipes in external links in template parameter !! wikitext {{echo|[{{echo|http://example.com}} link]}} !! html/php+tidy -

    link

    +

    link +

    !! html/parsoid -

    link

    +

    link

    !! end !! test @@ -2959,11 +2967,10 @@ Parsoid: pipe in transclusion parameter !! wikitext {{echo|http://foo.com/a|b}} !! html/php+tidy -

    http://foo.com/a%7Cb

    +

    http://foo.com/a%7Cb +

    !! html/parsoid -

    http://foo.com/a%7Cb

    +

    http://foo.com/a%7Cb

    !! end !! test @@ -2973,7 +2980,8 @@ parsoid=html2wt,wt2wt !! wikitext {{echo|[http://foo.com/a|b a|b]}} !! html/php+tidy -

    a|b

    +

    a|b +

    !! html/parsoid

    <div>}} {{echo|}} !! html/php+tidy -

    foo|bar <div>

    +

    foo|bar +<div> + +

    !! html/parsoid

    foo|bar <div> @@ -3016,7 +3027,8 @@ parsoid=html2wt,wt2wt !! wikitext {{echo|{{echo|1=bar}}}} !! html/php+tidy -

    bar

    +

    bar +

    !! html/parsoid

    bar

    !! end @@ -3027,7 +3039,8 @@ Templates parameters with special tokenizing behavior dont get modified because !! wikitext {{echo|a : b}} !! html/php+tidy -

    a : b

    +

    a : b +

    !! html/parsoid

    a : b

    !! end @@ -3038,7 +3051,8 @@ Templates: Preserve blank parameter names !! wikitext {{echo|=foo}} !! html/php+tidy -

    {{{1}}}

    +

    {{{1}}} +

    !! html/parsoid

    {{{1}}}

    !! end @@ -3048,7 +3062,9 @@ Templates: Preserve blank parameter names in other positions !! wikitext {{blank_param|bar|=foo}} !! html/php+tidy -

    bar foo

    +

    bar +foo +

    !! html/parsoid

    bar foo

    @@ -3152,15 +3168,15 @@ c 2c. Indent-Pre and tables (T44252) !! wikitext {| - |+ foo - ! | bar + |+foo + ! |bar |} !! html - -
    foo +foo
    bar +bar
    !!end @@ -3170,14 +3186,14 @@ c !! wikitext a {| - | b + |b |} !! html/php
    a
     
    -
    b +b
    !! html/parsoid @@ -3260,17 +3276,11 @@ a

    c

    foo
     foo 
     
    -!! html+tidy -

    a

    -

    foo

    -

    b

    -
    foo
    -

    c

    -
    -

    foo

    -
    -
    - foo 
    +!! html/php+tidy
    +

    a

    foo

    + b

    foo

    + c

    foo

    +
     foo 
     
    !! end @@ -3287,12 +3297,10 @@ a !! html/parsoid
    a foo
    b
    foo
    -!! html+tidy -
    -a foo
    -
    -

    b

    -
    foo
    +!! html/php+tidy +
    a foo
    +

    + b

    foo
    !!end !!test @@ -3527,7 +3535,8 @@ a b !! html/php+tidy -

    a b

    +

    a b +

    !! html/parsoid

    a

    +

    Google

    !! end !! test @@ -5649,7 +5500,7 @@ External link to bare IPv4 address

    Link

    !! html/parsoid -

    Link

    +

    Link

    !! end !! test @@ -5681,9 +5532,9 @@ http://example.com/index.php?foozoid[]=bar

    http://example.com/index.php?foozoid%5B%5D=bar

    !! html/parsoid -

    http://example.com/index.php?foozoid%5B%5D=bar

    +

    http://example.com/index.php?foozoid%5B%5D=bar

    -

    http://example.com/index.php?foozoid%5B%5D=bar

    +

    http://example.com/index.php?foozoid%5B%5D=bar

    !! end !! test @@ -5692,61 +5543,61 @@ 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

    +

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

    -

    Examples from RFC 2373, section 2.2:

    - +

    Examples from RFC 2373, section 2.2:

    + -

    Examples from RFC 2732, section 2:

    - +

    Examples from RFC 2732, section 2:

    + !! end !! test @@ -5755,61 +5606,61 @@ 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

    +

    test

    -

    Examples from RFC 2373, section 2.2:

    - +

    Examples from RFC 2373, section 2.2:

    + -

    Examples from RFC 2732, section 2:

    - +

    Examples from RFC 2732, section 2:

    + !! end !! test @@ -5849,13 +5700,13 @@ Non-extlinks in brackets [foo bar] [fool's] errand [fool's errand] -[foo] -[foo bar] -[foo bar] -[fool's] errand -[fool's errand] -[url=foo] -[url=http://example.com] +[foo] +[foo bar] +[foo bar] +[fool's] errand +[fool's errand] +[url=foo] +[url=http://example.com] [http:// bare protocols don't count]

    !! end @@ -5867,8 +5718,7 @@ Percent encoding in external links

    Search

    !! html/parsoid -

    Search

    +

    Search

    !! end !! test @@ -5879,7 +5729,7 @@ http://example.com

    http://example.com

    !! html/parsoid -

    http://example.com

    +

    http://example.com

    !! end !! test @@ -5911,14 +5761,14 @@ http://example.com/a)b

    foo

    !! html/parsoid -

    http://example.com)

    -

    http://example.com/test)

    -

    http://example.com/(test)

    -

    http://example.com/((test)

    -

    (http://example.com/(test))

    -

    (http://example.com/(test)))))

    -

    http://example.com/a)b

    -

    foo

    +

    http://example.com)

    +

    http://example.com/test)

    +

    http://example.com/(test)

    +

    http://example.com/((test)

    +

    (http://example.com/(test))

    +

    (http://example.com/(test)))))

    +

    http://example.com/a)b

    +

    foo

    !! end !! test @@ -5932,9 +5782,9 @@ Parenthesis in external links, w/ transclusion or comment

    (http://example.com)

    !! html/parsoid -

    (http://example.com/hi)

    +

    (http://example.com/hi)

    -

    (http://example.com)

    +

    (http://example.com)

    !! end !! test @@ -6138,15 +5988,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 @@ -6155,14 +6005,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 @@ -6172,18 +6022,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 @@ -6192,23 +6042,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 @@ -6217,19 +6067,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 @@ -6238,17 +6088,17 @@ Simple table Simple table but with multiple dashes for row wikitext !! wikitext {| -| foo +|foo |----- -| bar +|bar |} !! html - -
    foo +foo
    bar +bar
    !! end @@ -6259,67 +6109,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 @@ -6328,13 +6178,13 @@ Multiplication table Accept "||" in table headings !! wikitext {| -!h1 || h2 +!h1||h2 |} !! html - - +
    h1 h2 +h1h2
    !! end @@ -6343,12 +6193,12 @@ Accept "||" in table headings Accept "!!" in table data !! wikitext {| -| Foo!! || +|Foo!!|| |} !! html - +
    Foo!! Foo!!
    @@ -6362,13 +6212,13 @@ Accept "!!" in table data Accept "||" in indented table headings !! wikitext :{| -!h1 || h2 +!h1||h2 |} !! html
    - - +
    h1 h2 +h1h2
    !! end @@ -6420,15 +6270,12 @@ Accept "!!" in table data of mixed wikitext / html syntax !a b!!c |} -!! html+tidy +!! html/php+tidy - - - - - - -
    a
    b!!c
    + +a +b!!c + !! html/parsoid @@ -6446,9 +6293,9 @@ Accept empty attributes in td/th cells (td/th cells starting with leading ||) !! html
    a
    - -
    h1 +h1 a +a
    !! end @@ -6458,13 +6305,13 @@ Accept "| !" at start of line in tables (ignore !-attribute) !! wikitext {| |- -| !style="color:red" | bar +|!style="color:red"|bar |} !! html -
    bar +bar
    !!end @@ -6477,8 +6324,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 @@ -6492,18 +6339,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 @@ -6512,26 +6359,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 @@ -6552,7 +6399,7 @@ Nested table !! html -
    α +α @@ -6597,7 +6444,7 @@ Table cell attributes: Pipes protected by nowikis should be treated as a plain c -
    bar title="foo|" bar +title="foo|" bar
    !! html/parsoid @@ -6630,24 +6477,24 @@ parsoid=wt2html,html2html !! html/parsoid -
    [ftp://%7Cx]" onmouseover="alert(document.cookie)">test
    +
    [ftp://%7Cx]" onmouseover="alert(document.cookie)">test
    !! end !! test 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 @@ -6655,17 +6502,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 @@ -6676,18 +6523,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 @@ -6719,7 +6566,7 @@ Don't break on | in extension attribute in template !! html/parsoid -

    [1]

    +

    [1]

    1. ↑ ha
    !! end @@ -6733,22 +6580,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 @@ -6793,7 +6640,7 @@ parsoid={ Foo - style="color:red;" +style="color:red;" Bar Foo @@ -6894,7 +6741,7 @@ T107652: s in templates that also generate table cell attributes should be !! html/parsoid - +
    Foo[1]
    Foo[1]
    1. ↑ foo
    !! end @@ -6907,14 +6754,14 @@ parsoid=wt2html,html2html {| |- -! foo +!foo |} !! html/* -
    foo +foo
    !! end @@ -6927,14 +6774,14 @@ parsoid=wt2html,html2html {| |- -| foo +|foo |} !! html/* -
    foo +foo
    !! end @@ -6945,17 +6792,17 @@ Table attributes with empty value parsoid=wt2html,html2html !! wikitext {| -| style=| hello +| style=|hello |} !! html/php -
    hello +hello
    !! html/parsoid - +
    hello
    hello
    !! end @@ -6964,7 +6811,7 @@ Wikitext table with a lot of comments !! wikitext {| -| foo +|foo |- @@ -6974,7 +6821,7 @@ Wikitext table with a lot of comments !! html - +
    foo +foo
    @@ -6987,18 +6834,18 @@ Wikitext table comments represented in parsoid dom !! wikitext {| |- -| x +|x |} !! html/php+tidy - - - -
    x
    + +
    x +
    !! html/parsoid - +
    x
    x
    !! end @@ -7024,14 +6871,14 @@ Table cell with a single comment !! wikitext {| | -| a +|a |} !! html -
    a +a
    !! end @@ -7042,21 +6889,21 @@ Table-cell after a comment-only-empty-line {| |a -| b +|b |} !! html -
    a b +b
    !! html/parsoid - +
    a b
    b
    !! end @@ -7065,21 +6912,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 @@ -7088,33 +6935,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 @@ -7123,25 +6970,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 @@ -7164,7 +7011,7 @@ Wikitext table with html-syntax row !! end !! test -Implicit after a |- +Fostered content in tables: Plain text !! options parsoid=wt2html,html2html !! wikitext @@ -7179,7 +7026,10 @@ a !! html/php+tidy -

    a

    + + +a +
    !! html/parsoid

    a

    @@ -7188,7 +7038,7 @@ a !! end !! test -Lists should be recognized in an implicit
    context +Fostered content in tables: Lists !! options parsoid=wt2html,html2html !! wikitext @@ -7203,9 +7053,10 @@ parsoid=wt2html,html2html
    !! html/php+tidy -
      -
    • a
    • -
    +
    • a
    + + +
    !! html/parsoid
    • a
    @@ -7214,24 +7065,24 @@ parsoid=wt2html,html2html !! end !! test -Table cells not properly parsed in an implicit-td context +Template generated table cell with attributes !! wikitext {| |- -{{table_attribs_4}} || a || b +{{table_attribs_4}} ||a||b |} !! html/php+tidy
    - + + - - -
    ab
    +b + !! html/parsoid - + !! end !! test @@ -7248,17 +7099,14 @@ parsoid=wt2html,wt2wt |}quux !! html+tidy
    a b
    ab
    - - - -
    foo
    -

    bar

    - - - - -
    baz
    -

    quux

    + +foo +

    bar +

    + +
    baz +

    quux +

    !! end !! test @@ -7299,17 +7147,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 - - + - - +
    foo bar +foobar baz quux +bazquux
    !! html/parsoid @@ -7330,12 +7178,11 @@ foo |} !!html/php+tidy - + - -
    -

    foo

    -
    +

    foo +

    + !!html/parsoid @@ -7409,24 +7256,28 @@ parsoid=html2wt |} !! html/php+tidy
    - - - - - + + + + - - - + + - - - + + - - - -
    Test
    MonthSavings
    Test +
    Month +Savings +
    January$100
    January +$100 +
    February$80
    February +$80 +
    Sum$180
    +Sum + +$180 + !! end # T137406: No whitespace in the HTML @@ -8127,7 +7978,7 @@ Plain link to URL

    [[1]]

    !! html/parsoid -

    []

    +

    []

    !! end !! test @@ -8147,7 +7998,7 @@ Plain link to protocol-relative URL

    [[1]]

    !! html/parsoid -

    []

    +

    []

    !! end !! test @@ -8190,7 +8041,7 @@ Piped link to URL: [[http://www.example.com|an example URL]]

    Piped link to URL: [example URL]

    !! html/parsoid -

    Piped link to URL: [example URL]

    +

    Piped link to URL: [example URL]

    !! end !! test @@ -8212,13 +8063,13 @@ parsoid=wt2html

    [http://www.example.com

    !! html/parsoid -

    [http://www.example.com

    +

    [http://www.example.com

    -

    [|123]

    +

    [|123]

    -

    {{echo|[|123}}

    +

    {{echo|[|123}}

    -

    [http://www.example.com

    +

    [http://www.example.com

    !! end !! test @@ -8239,11 +8090,9 @@ T2337: Escaped self-links should be bold title=[[Bug462]] !! wikitext [[Bug462]] [[Bug462]] -!! html/php +!! html/php+tidy

    Bug462 Bug462

    -!! html/php+tidy -

    Bug462 Bug462

    !! html/parsoid

    Bug462 Bug462

    !! end @@ -8684,7 +8533,7 @@ parsoid=wt2html,wt2wt -!! html+tidy +!! html/php+tidy
    • Wikipedia:ro:OlteniÅ£a
    • Wikipedia:ro:OlteniÅ£a
    • @@ -8796,8 +8645,8 @@ Interwiki links that cannot be represented in wiki syntax

      meatball:ok ok with fragment ok ending with ? mark -has query -is just fragment

      +has query +is just fragment

      !! end !! test @@ -9402,9 +9251,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 @@ -9475,8 +9324,9 @@ parsoid=wt2html
      !! html+tidy -


      -


      +


      +


      +

      !! end !! test @@ -9568,10 +9418,9 @@ foo
      bar !! html+tidy
      -
      -

      foo

      -
      -

      bar

      +

      +foo


      bar +

      !! end !! test @@ -9620,8 +9469,8 @@ Horizontal ruler -- Supports content following dashes on same line
      Foo !! html+tidy -
      -

      Foo

      +

      Foo +

      !! end ### @@ -9631,11 +9480,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 @@ -9645,11 +9494,11 @@ 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 @@ -9657,9 +9506,9 @@ Numbered list 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 @@ -9669,13 +9518,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 @@ -9685,43 +9534,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 @@ -9793,24 +9642,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 @@ -9851,60 +9700,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 @@ -9922,11 +9772,14 @@ Multiple list tags generated by templates !! html+tidy -
        -
      • a
      • -
      • b
      • -
      • c
      • -
      +
    • a +
    • b +
    • c +
    • +!! html/parsoid +
    • a +
    • b +
    • c
    • !!end !!test @@ -9966,36 +9819,36 @@ Replacing whitespace with tabs still doesn't break the list (gerrit 78327) !!end +# FIXME: Parsoid has a dedicated DOM pass to mimic this Tidy-specific li-hack +# That pass could possibly be removed. !!test -Test the li-hack -(The PHP parser relies on Tidy for the hack) +Test the li-hack (a hack from Tidy days, but doesn't work as advertised with Remex) !!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
      • +
      • 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 @@ -10009,24 +9862,24 @@ 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 @@ -10048,101 +9901,103 @@ parsoid # tags (parse, minimize scope of fixup, and roundtrip back) # ------------------------------------------------------------------------ +# Remex and Parsoid output stems from list handling diffs because Parsoid & PHP parser. +# Parsoid's list handling is more aware of block structure. !! test Unbalanced closing block tags break a list -(php parser relies on Tidy to fix up) !! wikitext
          *a
          *b
          !! html+tidy
          -
            +
            • a
          +
        • b
        • +!! html/parsoid +
          • a
          • -
          -
          -
          -
            +
          +
          • b
          • -
          -
          +
    !! end -# Parsoid fails this test, but it might be tricky to support properly. -# See T70395. !! test Unbalanced closing non-block tags don't break a list -(php parser relies on Tidy to fix up) !! wikitext *a *b !! html/php+tidy -
      -
    • a
    • -
    • b
    • -
    +

    +

    +
    • a
    • +
    • b
    !! html/parsoid
      -
    • a -
    • -
    • b -
    • +
    • a
    • +
    • b
    !! end +# Parsoid does some post-dom-building cleanup +# which is why its output differs from Remex. !! test Unclosed formatting tags that straddle lists are closed and reopened -(php parser relies on Tidy to fix up) !! options parsoid=wt2html,wt2wt,html2html !! wikitext -# a -# b +# a +#b !! html/php+tidy -
      -
    1. a
    2. -
    3. b
    4. -
    +
    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. +# Remex is wrapping p-tags around empty elements. +# Parsoid has special-case handling of this pattern of +# wrapping lists in formatting tags. +# FIXME: Should we remove this code from Parsoid? Or add +# special support in Remex? If the latter, maybe just wait +# for Parsoid to become the default parser. # See T70395. !!test 1. List embedded in a formatting tag !! wikitext -* foo +*foo !! html/php+tidy -
      -
    • foo
    • -
    +

    +

    • foo

    +

    !! html/parsoid
      -
    • foo
    • +
    • foo
    !!end -## Ugly Parsoid output here -## Not sure what the right output is. +# Output is ugly because of all the misnested tag fixups +# Remex is wrapping p-tags around empty elements. +# Parsoid has code that strips useless p-tags. !!test -2. List embedded in a formatting tag +2. List embedded in a formatting tag in a misnested way !! wikitext *a *b !! html/php+tidy -
      -
    • a
    • -
    • b
    • -
    +

    +

    • a
    • +
    • b
    !! html/parsoid
      @@ -10152,31 +10007,6 @@ parsoid=wt2html,wt2wt,html2html
    !!end -# Ugly Parsoid and PHP parser output here -# Not sure if we want to make this a test! -# -## !!test -## 3. Unclosed formatting tags in list elements -## !! wikitext -## *a -## *b -## !! html/php+tidy -##
      -##
    • a
    • -##
    • b
    • -##
    -## !! html/parsoid -##
      -##
    • a
    • -## -##
    • b
    • -##
    -## !!end - -# This is a bug in the PHP parser + tidy combination. -# (The tag gets parsed as text and html-escaped by PHP, -# and then fostered out of the table by tidy.) -# We believe the Parsoid output to be correct. !! test Table with missing opening tag !! options @@ -10188,10 +10018,9 @@ parsoid=wt2html,wt2wt !! html+tidy - - + -
    foo
    foo
    + !! end ### @@ -10332,35 +10161,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 @@ -10669,11 +10498,9 @@ title=[['foo & bar = baz']] parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true } !! wikitext ''{{PAGENAME}}'' -!! html/php +!! html+tidy

    'foo & bar = baz'

    -!! html+tidy -

    'foo & bar = baz'

    !! end !! test @@ -10683,11 +10510,9 @@ title=[[*RFC 1234 http://example.com/]] parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true } !! wikitext {{PAGENAME}} -!! html/php +!! html+tidy

    *RFC 1234 http://example.com/

    -!! html+tidy -

    *RFC 1234 http://example.com/

    !! end !! test @@ -10709,11 +10534,9 @@ title=[[*RFC 1234 http://example.com/]] parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true } !! wikitext {{PAGENAMEE}} -!! html/php +!! html+tidy

    *RFC_1234_http://example.com/

    -!! html+tidy -

    *RFC_1234_http://example.com/

    !! end !! test @@ -11053,7 +10876,7 @@ RFC 822

    RFC 822

    !! html/parsoid -

    RFC 822

    +

    RFC 822

    !! end !! test @@ -11064,7 +10887,7 @@ This is RFC 822 but thisRFC 822 is not RFC 822linked.

    This is RFC 822 but thisRFC 822 is not RFC 822linked.

    !! html/parsoid -

    This is RFC 822 but thisRFC 822 is not RFC 822linked.

    +

    This is RFC 822 but thisRFC 822 is not RFC 822linked.

    !! end !! test @@ -11079,7 +10902,7 @@ RFC 822

    !! html/parsoid -

    RFC       822 +

    RFC       822 RFC 822

    !! end @@ -11137,7 +10960,7 @@ PMID 1234

    PMID 1234

    !! html/parsoid -

    PMID 1234

    +

    PMID 1234

    !! end !! test @@ -11148,7 +10971,7 @@ This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.

    This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.

    !! html/parsoid -

    This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.

    +

    This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.

    !! end !! test @@ -11163,7 +10986,7 @@ PMID 1234

    !! html/parsoid -

    PMID       1234 +

    PMID       1234 PMID 1234

    !! end @@ -11182,7 +11005,7 @@ X[https://tools.ietf.org/html/rfc1234 foo]

    !! html/parsoid

    Xfoo

    -

    Xfoo

    +

    Xfoo

    !! end !! test @@ -11432,11 +11255,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. @@ -11474,12 +11297,7 @@ Template with thumb image (with link in description) This is a test template with parameter !! html+tidy -

    This is a test template with parameter

    - +

    This is a test template with parameter

    !! html/parsoid

    This is a test template with parameter

    link caption
    !! end @@ -11525,28 +11343,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 @@ -11554,11 +11372,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 @@ -11672,12 +11490,12 @@ foo {{table}}

    - - + - - +
    1 2 +12
    3 4 +34
    !! end @@ -11692,12 +11510,12 @@ foo

    - - + - - +
    1 2 +12
    3 4 +34
    !! end @@ -11763,21 +11581,13 @@ Templates with intersecting and overlapping ranges {{echo|{{!}}hi}} |} !! html/php+tidy -

    ha

    -

    ho

    - - - - - - - -
    hi
    - - - - -
    +

    ha

    + +

    ho

    + + +
    hi +
    !! html/parsoid

    ha

    @@ -12023,32 +11833,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 @@ -12267,10 +12077,10 @@ Preprocessor precedence 5: tplarg takes precedence over template !! wikitext {{Precedence5|Bullet}} !! html/php -
    • Bar
    +
    • Bar
    !! html/parsoid -
    • Bar
    +
    • Bar
    !! end !! test @@ -12360,14 +12170,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
    @@ -12405,21 +12215,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
    @@ -12473,43 +12283,34 @@ Preprocessor precedence 12: broken language converter closed by brace. parsoid=wt2html !! wikitext This form breaks the template, which is unfortunate: -* {{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
    }} +*{{echo|foo-{bar}bat}} -foo-{bar}bat -{{echo|foo-{bar}bat}} - -!! html/php+tidy -

    This form breaks the template, which is unfortunate:

    -
      -
    • {{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'
    +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}} + +!! html/php+tidy +

    This form breaks the template, which is unfortunate: +

    +
    • {{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'
     array (
     )
     
    -
    -'foo-{bar}bat'
    +
    'foo-{bar}bat'
     array (
     )
     
    @@ -12533,40 +12334,36 @@ 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 !! end !! 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
    • +
      • ...should be ok
      • ...extra dashes
      • -
      • foobat ...should be ok
      • -
      +
    • 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 @@ -12592,17 +12389,23 @@ __NOTOC__ __NOEDITSECTION__ 6 !! html/php+tidy

    1 foo[bar 1

    -

    1

    +

    1 +

    2 foo[[bar 2

    -

    2

    +

    2 +

    3 foo{bar 3

    -

    3

    +

    3 +

    4 foo{{bar 4

    -

    4

    +

    4 +

    5 foo{{{bar 5

    -

    5

    +

    5 +

    6 foo-{bar 6

    -

    6

    +

    6 +

    !! html/parsoid

    1 foo[bar 1

    @@ -12646,6 +12449,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 ### @@ -12775,9 +12604,7 @@ Templates: 2. Inside a block tag !! html+tidy
    Foo
    -
    -

    Foo

    -
    +

    Foo

    !!end !!test @@ -12816,9 +12643,9 @@ Templates: P-wrapping: 1c. Templates on consecutive lines bar
    baz
    !! html+tidy -

    Foo

    -

    bar

    -
    baz
    +

    Foo +

    +bar

    baz
    !! end !!test @@ -13112,17 +12939,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 @@ -13241,12 +13068,13 @@ Templates: Wiki Tables: 1a. Fostering of entire template content a -!! html+tidy -

    a

    - - - - +!! html/php+tidy + +a +
    +!! html/parsoid +

    a

    +
    !! end @@ -13266,14 +13094,18 @@ foo -!! html+tidy +!! html/php+tidy
    +

    foo +

    +
    + +
    +!! html/parsoid +

    foo

    -
    - - - - +
    +
    !! end @@ -13290,13 +13122,15 @@ a
    b
    -!! html+tidy -

    a

    -
    b
    - - - - +!! html/php+tidy + +a +
    b
    +
    +!! html/parsoid +

    a

    b
    + +
    !! end @@ -13366,7 +13200,7 @@ Templates: Wiki Tables: 7. Fosterable s should get fostered !!html/parsoid -[1] +[1]
    @@ -13445,78 +13279,10 @@ a
    b{{echo|c
    d}}e a
    bc
    de !! html+tidy -

    a

    -
    bc
    -

    de

    +

    a

    bc

    de +

    !! end -!!test -Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting -(Parsoid-centric) -!! options -parsoid -!! wikitext -{| -|{{echo|foo}} -|bar -|} -!! html - - - - -
    foo
    -|bar -|} -!!end - -!!test -Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting -(Parsoid-centric) -!! options -parsoid -!! wikitext - - - - -
    - - -
    1. {{echo|foo
    }}
    bar 2. {{echo|baz
    }} - - - abc - - - - - - xyz - - -!! html - - - - -
    - - -
    1. foo
    bar 2. baz
    - - - abc - - - - - - xyz - - -!!end - !! test Templates: Ugly templates: 3. newline-only template parameter !! wikitext @@ -14449,6 +14215,8 @@ Titles in unlinked images (T23454) !! html/php

    stuff

    +!! html/parsoid +

    !! end !! test @@ -14545,18 +14313,11 @@ thumbsize=220 123
    Foobar.jpg
    456 !! html/php+tidy -

    123Foobar.jpg456

    -

    123

    -
    Foobar.jpg
    -

    456 123

    -
    -
    Foobar.jpg -
    -
    -
    -
    -
    -

    456

    +

    123Foobar.jpg456 +

    +123

    Foobar.jpg

    456 +123

    Foobar.jpg

    456 +

    !! html/parsoid

    123456

    123

    456

    @@ -14703,7 +14464,7 @@ Image with link parameter, wgNoFollowLinks set to false [[Image:foobar.jpg|link=http://example.com/]] !! config wgNoFollowLinks=false -!! html +!! html/php

    Foobar.jpg

    !! end @@ -14714,7 +14475,7 @@ Image with link parameter, wgNoFollowDomainExceptions [[Image:foobar.jpg|link=http://example.com/]] !! config wgNoFollowDomainExceptions='example.com' -!! html +!! html/php

    Foobar.jpg

    !! end @@ -15195,7 +14956,7 @@ thumbsize=220 !! html/parsoid -
    http://example.com
    +
    http://example.com
    !! end !! test @@ -15209,7 +14970,7 @@ parsoid=wt2html,wt2wt,html2html !! html/parsoid -
    Alteration
    http://example.com
    +
    Alteration
    http://example.com
    !! end !! test @@ -15269,7 +15030,7 @@ T3887: A RFC with a thumbnail
    This is RFC 12354
    !! html/parsoid -
    This is RFC 12354
    +
    This is RFC 12354
    !! end !! test @@ -15280,7 +15041,7 @@ T3887: A mailto link with a thumbnail !! html/parsoid -
    Please mailto:nobody@example.com
    +
    Please mailto:nobody@example.com
    !! end # Pending resolution to T2368 @@ -15430,6 +15191,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 @@ -15437,21 +15202,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 @@ -15463,7 +15228,7 @@ T5090: External links other than http: in image captions
    This caption has irc and Secure ext links in it.
    !! html/parsoid -
    This caption has irc and Secure ext links in it.
    +
    This caption has irc and Secure ext links in it.
    !! end !! test @@ -15799,7 +15564,7 @@ T93580: 1. Templated inside block images !! html/parsoid -
    Caption with templated ref: [1]
    +
    Caption with templated ref: [1]
    1. ↑ foo
    !! end @@ -15811,7 +15576,7 @@ T93580: 2. inside inline images !! html/parsoid -

    +

    1. ↑ foo
    !! end @@ -15823,7 +15588,7 @@ T93580: 3. Templated inside inline images !! html/parsoid -

    +

    1. ↑ foo
    !! end @@ -15964,7 +15729,7 @@ Render invalid page names as plain text (T53090) [[.]] [[..]] [[foo././bar]] -[[fooxyz]]

    +[[fooxyz]]

    [[./../foo|bar]] [[foo/.|bar]] @@ -16177,7 +15942,8 @@ Bar

    Foo Bar

    Foo Bar

    Foo Bar

    -

    Foo Bar

    +

    Foo Bar

    + !! end @@ -16560,7 +16326,7 @@ es:1 fr:1 !! test Basic section headings !! wikitext -== Headline 1 == +==Headline 1== Some text ==Headline 2== @@ -16582,12 +16348,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 @@ -16629,10 +16395,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

      @@ -16657,16 +16423,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

      @@ -16704,33 +16470,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

        @@ -16782,12 +16548,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

          @@ -16848,8 +16614,8 @@ wgMaxTocLevel=3 !! test Resolving duplicate section names !! wikitext -== Foo bar == -== Foo bar == +==Foo bar== +==Foo bar== !! html

          Foo bar[edit]

          Foo bar[edit]

          @@ -16859,8 +16625,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]

          @@ -16914,9 +16680,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

            @@ -16943,7 +16709,7 @@ http://example.com [[File:Foobar.jpg]]

            http://example.com Foobar.jpg

            !! html/parsoid -

            http://example.com

            +

            http://example.com

            !!end # Parsoid doesn't wt2wt this cleanly because it adds s. @@ -16977,19 +16743,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) @@ -17022,19 +16788,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 @@ -17043,22 +16809,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]] @@ -17108,22 +16874,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 @@ -17172,13 +16938,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

            @@ -17207,13 +16973,13 @@ __NOEDITSECTION__ !! 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 @@ -17248,7 +17014,7 @@ http://example.com[[File:Foobar.jpg]]

            http://example.comFoobar.jpg

            !! html/parsoid -

            http://example.com

            +

            http://example.com

            !!end !! test @@ -17357,23 +17123,37 @@ parsoid=wt2html,html2html
            HTML rocks
            !! end +# FIXME Parsoid doesn't actually match PHP here. +# Probably we should use the synthetic or +# extensions for this test, which are enabled when running parser tests. +!! test +Extension tag in attribute value +!! wikitext +ok +!! html/php+disabled +

            <span title="<translate>123</translate>">ok</span> +

            +!! html/parsoid +

            ok

            +!! end + !! test table with multiple empty attribute values !! options parsoid=wt2html,html2html !! wikitext {| title= id= -| hi +|hi |} !! html/php -
            hi +hi
            !! html/parsoid - +
            hi
            hi
            !! end @@ -17414,12 +17194,12 @@ HTML multiple attributes correction Table multiple attributes correction !! wikitext {| -!+ class="error" class="awesome"| status +!+ class="error" class="awesome"|status |} !! html -
            status +status
            !!end @@ -17464,11 +17244,9 @@ Remember AT&T? text with character entity: eacute !! wikitext I always thought é was a cute letter. -!! html +!! html+tidy

            I always thought é was a cute letter.

            -!! html+tidy -

            I always thought é was a cute letter.

            !! end !! test @@ -17546,12 +17324,11 @@ Ensure that HTML adoption agency algorithm is properly implemented. !! end # This was T43545 in the PHP parser. -# Note that tidy doesn't handle this correctly. !! test Nesting of !! wikitext XYZ -!! html +!! html+tidy

            XYZ

            !! end @@ -17560,22 +17337,20 @@ Nesting of # Note that there are some other nestable tags (b, i, etc) which are # not covered; see T53081 for discussion. -# Note that tidy doesn't handle this correctly. !! test Nesting of !! wikitext XYZ -!! html +!! html+tidy

            XYZ

            !! end -# Note that tidy doesn't handle this correctly. !! test Nesting of !! wikitext XYZ -!! html +!! html+tidy

            XYZ

            !! end @@ -17585,10 +17360,10 @@ Nesting of !! wikitext XYZ !! html+tidy -

            XYZ

            +

            XYZ +

            !! end -# Note that tidy doesn't handle this correctly. !! test Nesting of !! wikitext @@ -17598,7 +17373,6 @@ Nesting of

            !! end -# Note that tidy doesn't handle this correctly. !! test Nesting of !! wikitext @@ -17643,6 +17417,7 @@ Media link with text # FIXME: this is still bad HTML tag nesting # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div +# Parsoid & Remex fix the p-wrapping since they operate on the DOM. !! test Media link with nasty text !! wikitext @@ -17650,9 +17425,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

            @@ -18176,12 +17950,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 @@ -18190,12 +17964,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 @@ -18256,11 +18030,12 @@ Expansion of multi-line templates in attribute values (T8255 sanity check 2) !! end !! test -Tags which are hidden from Tidy cannot pass through the Sanitizer +Tags which are hidden from tidiers cannot pass through the Sanitizer !! wikitext !! html+tidy -

            <mw:toc><script>alert();</script></mw:toc>

            +

            <mw:toc><script>alert();</script></mw:toc> +

            !! end ### @@ -18565,14 +18340,14 @@ Nested template calls ### Sanitizer ### -# HTML+Tidy strips out empty tags completely. Parsoid doesn't. -# FIXME: Wikitext for this first test doesn't match its title. +# Remex wraps empty tag runs with p-tags. +# Parsoid strips them out during p-wrapping. !! test Sanitizer: Closing of open tags !! wikitext
            !! html/php+tidy - +

            !! html/parsoid
            !! end @@ -18593,6 +18368,8 @@ parsoid=wt2html !! wikitext !! html/php+tidy +

            +

            !! html/parsoid !! end @@ -18602,10 +18379,9 @@ Sanitizer: Closing of closed but not open table tags parsoid=wt2html !! wikitext Table not started -!! html/php+tidy -

            Table not started

            -!! html/parsoid -

            Table not started

            +!! html+tidy +

            Table not started +

            !! end !! test @@ -18763,7 +18539,7 @@ language=sr variant=sr-el !! html/parsoid

            -

            foAjrjvi

            +

            foAjrjvi

            !! end !! test @@ -18776,10 +18552,6 @@ Self closed html pairs (T7487)
            In div text
            !! end -# -# -# - !! test Punctuation: nbsp before exclamation !! wikitext @@ -18837,9 +18609,9 @@ HTML bullet list, unclosed tags (T7497)
          !! html/php+tidy
            -
          • One
          • -
          • Two
          • -
          +
        • One +
        • Two +
        !! html/parsoid
        • One
        • @@ -18879,9 +18651,9 @@ HTML ordered list, unclosed tags (T7497) !! html/php+tidy
            -
          1. One
          2. -
          3. Two
          4. -
          +
        • One +
        • Two +
        • !! html/parsoid
          1. One
          2. @@ -18936,30 +18708,15 @@ HTML nested bullet list, open tags (T7497)
          3. Sub-two
      -!! html/php+tidy -
        -
      • One
      • -
      • Two: -
          -
        • Sub-one
        • -
        • Sub-two
        • -
        -
      • -
      -!! html/parsoid +!! html+tidy
      • One -
      • -
      • Two: +
      • Two:
        • Sub-one -
        • -
        • Sub-two -
        • -
        -
      • -
      - +
    • Sub-two +
    +
  • !! end !! test @@ -19056,11 +18813,11 @@ mailto:inline@mail.tld

    mailto:inline@mail.tld

    !! html/parsoid -

    -

    ftp://inlineftp

    -

    With target

    -

    -

    mailto:inline@mail.tld

    +

    +

    ftp://inlineftp

    +

    With target

    +

    +

    mailto:inline@mail.tld

    !! end @@ -19090,7 +18847,7 @@ Fuzz testing: Parser13 !! test Fuzz testing: Parser14 !! wikitext -== onmouseover= == +==onmouseover=== http://__TOC__ !! html/php

    onmouseover=[edit]

    @@ -19102,20 +18859,15 @@ http://

    C !! html/php+tidy -

    onmouseover=[edit]

    -

    http://

    -
    -
    -

    Contents

    -
    +

    onmouseover=[edit]

    +http://

    Contents

    -

    !! html/parsoid -

    onmouseover=

    -

    http://__TOC__

    +

    onmouseover=

    +

    http://__TOC__

    !! end !! test @@ -19144,43 +18896,34 @@ parsoid=wt2html,html2html !! end # Known to produce bogus xml (extra ) +# Don't add the html/php section since it generates broken HTML !! test Fuzz testing: Parser16 !! wikitext {| !https://|||||| -!! html +!! html+tidy - + -
    https:// - -
    -!! html+tidy - - - - - - - -
    https://
    + + !! end !! test Fuzz testing: Parser21 !! wikitext {| -! irc://{{ftp://a" onmouseover="alert('hello world');" +!irc://{{ftp://a" onmouseover="alert('hello world');" | !! html - @@ -19273,7 +19016,7 @@ http://example.com junk

    http://example.com junk

    !! html/parsoid -

    http://example.com junk

    +

    http://example.com junk

    !! end !!test @@ -19284,7 +19027,7 @@ http://example.comjunk

    http://example.comjunk

    !! html/parsoid -

    http://example.comjunk

    +

    http://example.comjunk

    !! end !! test @@ -19295,12 +19038,9 @@ http://example.com
    junk
    http://example.com
    junk
    !! html/php+tidy -

    http://example.com

    -
    -junk
    -
    +

    http://example.com

    junk
    !! html/parsoid -

    http://example.com

    junk
    +

    http://example.com

    junk
    !! end !! test @@ -20354,23 +20094,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. @@ -20440,51 +20180,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. @@ -20573,7 +20313,7 @@ image4 |300px| centre
  • -
  • +
  • !! end @@ -20975,7 +20715,7 @@ File:Foobar.jpg|alt=galleryalt|link=Wikilink !! html/parsoid -
    irc://{{ftp://a" onmouseover="alert('hello world');" +irc://{{ftp://a" onmouseover="alert('hello world');"
    -
    B +B
    !! html/parsoid @@ -23164,26 +22909,20 @@ language=sr !! test T2529: Uncovered bullet !! wikitext -* Foo {{bullet}} +*Foo {{bullet}} !! html -
    • Foo
    • -
    • Bar
    +
    • Foo
    • +
    • Bar
    !! end -# Plain MediaWiki does not remove empty lists, but tidy actually does. -# Templates in Wikipedia rely on this behavior, as tidy has always been -# enabled there. These tests are normally run *without* tidy, so specify the -# full output here. -# To test realistic parsing behavior, apply a tidy-like transformation to both -# the expected output and your parser's output. !! test -T2529: Uncovered bullet leaving empty list, normally removed by tidy +T2529: Uncovered bullet in a deeply nested list !! wikitext -******* Foo {{bullet}} +*******Foo {{bullet}} !! html -
                • Foo
    • -
    • Bar
    +
                • Foo
    • +
    • Bar
    !! end @@ -23199,12 +22938,12 @@ y

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

    y

    @@ -23213,10 +22952,10 @@ y !! test T2529: Uncovered bullet in parser function result !! wikitext -* Foo {{lc:{{bullet}} }} +*Foo {{lc:{{bullet}} }} !! html -
    • Foo
    • -
    • bar
    +
    • Foo
    • +
    • bar
    !! end @@ -23369,14 +23108,17 @@ Line two !! end +# doBlockLevels screws up this output and Remex cleans up as much as it can. +# Parsoid seems to do a better job here since its p-wrapper is probably smarter. !! test Nesting tags, paragraphs on lines which begin with
    !! wikitext
    A B !! html/php+tidy -

    A

    -

    B

    +

    A +

    B +

    !! html/parsoid

    A @@ -23396,9 +23138,8 @@ Line two Line two !! html+tidy -

    -

    Line one Line two

    -
    +

    Line one +Line two

    !! end !! test @@ -23416,10 +23157,12 @@ Line two !! html+tidy
    -

    Line one

    -Line two
    +

    Line one +

    +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 @@ -23434,9 +23177,9 @@ Line two !! html+tidy -
    -

    Line one

    -

    Line two

    +

    Line one +

    Line two +

    !! end @@ -23455,13 +23198,9 @@ Line two

    -!! html+tidy -
    -

    Line one

    -

    Line two

    -
    !! end +# FIXME: Why does/should the blockquote+div combo suppress p-wrapping here? !! test Paragraphs inside blockquotes/divs (no extra line breaks) !! wikitext @@ -23540,9 +23279,11 @@ wgLinkHolderBatchSize=0 Free external link invading image caption !! wikitext [[Image:Foobar.jpg|thumb|http://x|hello]] -!! html +!! html/php
    hello
    +!! html/parsoid +
    hello
    !! end !! test @@ -23555,25 +23296,29 @@ language=fa

    [Û±]

    !! html/parsoid -

    +

    !! end !! test Multibyte character in padleft !! wikitext {{padleft:-Hello|7|Æ}} -!! html +!! html/php

    Æ-Hello

    +!! html/parsoid +

    Æ-Hello

    !! end !! test Multibyte character in padright !! wikitext {{padright:Hello-|7|Æ}} -!! html +!! html/php

    Hello-Æ

    +!! html/parsoid +

    Hello-Æ

    !! end !!test @@ -23813,7 +23558,7 @@ comment Bad images - basic functionality !! wikitext [[File:Bad.jpg]] -!! DISABLED/html/php +!! html/php+disabled !! html/parsoid

    !! end @@ -23824,7 +23569,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

    @@ -24002,13 +23747,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 @@ -24018,8 +23763,8 @@ paragraphs 02=Main Page 03=Foobar.jpg 04=Foobar.jpg -05=
    • foo
    • -
    • bar
    +05=
    • foo
    • +
    • bar
    06=foo 07=
    Preformatted
    @@ -24028,7 +23773,7 @@ paragraphs
     
     09=
    -
    cell +cell
    10=

    Two @@ -24295,7 +24040,7 @@ T28375: TOC with italics title=[[Main Page]] !! wikitext __TOC__ -== ''Lost'' episodes == +==''Lost'' episodes== !! html/php

    Contents

      @@ -24307,7 +24052,7 @@ __TOC__ !! html/parsoid -

      Lost episodes

      +

      Lost episodes

      !! end !! test @@ -24316,7 +24061,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

        @@ -24328,7 +24073,7 @@ __TOC__ !! html/parsoid -

        should be bold then normal text

        +

        should be bold then normal text

        !! end !! test @@ -24337,7 +24082,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

          @@ -24349,7 +24094,7 @@ __TOC__ !! html/parsoid -

          Image

          +

          Image

          !! end !! test @@ -24358,7 +24103,7 @@ T35845 (2): Headings become bold in TOC when they contain a blockquote title=[[Main Page]] !! wikitext __TOC__ -==
          Quote
          == +==
          Quote
          == !! html/php

          Contents

            @@ -24369,24 +24114,16 @@ __TOC__

            Quote
            [edit]

            !! html/php+tidy -

            -
            -
            -

            Contents

            -
            +

            Contents

            -

            -

            -
            -

            Quote

            -
            -

            [edit]

            + +

            Quote

            [edit]

            !! html/parsoid -

            Quote

            +

            Quote

            !! end !! test @@ -24397,7 +24134,7 @@ wgFragmentMode=[ 'html5', 'legacy' ] title=[[Main Page]] !! wikitext __TOC__ -== Proof: 2 < 3 == +==Proof: 2 < 3== Hanc marginis exiguitas non caperet. QED !! html/php @@ -24413,7 +24150,7 @@ QED

            !! html/parsoid -

            Proof: 2 < 3

            +

            Proof: 2 < 3

            Hanc marginis exiguitas non caperet. QED

            !! end @@ -24422,9 +24159,9 @@ QED

            Multiple tags in TOC !! wikitext __TOC__ -== Foo Bar == +==Foo Bar== -== Foo
            Bar
            == +==Foo
            Bar
            == !! html/php

            Contents

              @@ -24437,28 +24174,20 @@ __TOC__

              Foo
              Bar
              [edit]

              !! html/php+tidy -

              -
              -
              -

              Contents

              -
              + -

              +

              Foo Bar[edit]

              -

              Foo

              -
              -

              Bar

              -
              -

              [edit]

              +

              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 @@ -24469,9 +24198,9 @@ Tags with parameters in TOC parsoid=wt2html !! wikitext __TOC__ -== Hello == +==Hello== -== Evilbye == +==Evilbye== !! html/php

              Contents

                @@ -24485,24 +24214,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

                  @@ -24522,18 +24251,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

                    @@ -24545,14 +24274,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

                      @@ -24564,17 +24293,14 @@ __TOC__ !! html/parsoid -

                      test test test

                      +

                      test test test

                      !! end -# Note that the html output does not have the

                      , but the -# html+tidy output *does*. This is because the empty

                      is -# removed by the sanitizer, but only when tidy is *not* enabled (!). !! test Empty

                      tag in TOC, removed by Sanitizer (T92892) !! wikitext __TOC__ -== x == +==x== !! html/php

                      Contents

                        @@ -24584,21 +24310,9 @@ __TOC__

                        x[edit]

                        -!! html/php+tidy -

                        -
                        -
                        -

                        Contents

                        -
                        - -
                        -

                        -

                        x[edit]

                        !! html/parsoid -

                        x

                        +

                        x

                        !! end !! article @@ -24750,17 +24464,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 @@ -24774,15 +24488,46 @@ Language parser function

                        !! end +!!test +Padleft and padright (default 0-padding) +!! wikitext +{{padleft:xyz|5}} +{{padright:xyz|5}} +!! html/php +

                        00xyz +xyz00 +

                        +!! html/parsoid +

                        00xyz +xyz00

                        +!! end + +!!test +Padleft and padright (partial fill) +!! wikitext +{{padleft:xyz|6|ab}} +{{padright:xyz|6|ab}} +!! html/php +

                        abaxyz +xyzaba +

                        +!! html/parsoid +

                        abaxyz +xyzaba

                        +!! end + !!test Padleft and padright as substr !! wikitext {{padleft:|3|abcde}} {{padright:|3|abcde}} -!! html +!! html/php

                        abc abc

                        +!! html/parsoid +

                        abc +abc

                        !! end !!test @@ -24806,7 +24551,7 @@ T36939 - Case insensitive link parsing ([HttP://])

                        [1]

                        !! html/parsoid -

                        +

                        !! end !!test @@ -24826,7 +24571,7 @@ HttP://MediaWiki.Org/

                        HttP://MediaWiki.Org/

                        !! html/parsoid -

                        HttP://MediaWiki.Org/

                        +

                        HttP://MediaWiki.Org/

                        !! end !!test @@ -24835,11 +24580,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

                        @@ -25363,6 +25108,21 @@ a !! end +!! test +Headings: Used as horizontal rule +!! config +wgFragmentMode=[ 'html5', 'legacy' ] +!! options +parsoid=wt2html +!! wikitext +=============== +!! html/php +
                        ===[edit]
                        + +!! html/parsoid +
                        ===
                        +!! end + #### --------------- Lists --------------- #### 0. Outside nests (*foo, etc.) #### 1. Nested inside html
                        • *foo
                        @@ -25669,15 +25429,12 @@ parsoid=html2wt |} !! html/php+tidy + + - - - - - -
                        foo|bar +
                        foo|bar
                        x -
                        a|b
                        -
                        +x
                        a|b
                        + !! end !! test @@ -25952,9 +25709,9 @@ parsoid=html2wt !! html/php - -
                        <foo +<foo bar> +bar>
                        !! end @@ -26786,8 +26543,8 @@ parsoid=wt2html,html2html !! wikitext
                        -

                        Foo

                        +

                        Foo +

                        !! html/parsoid

                        Foo

                        !! end @@ -26844,12 +26601,12 @@ parsoid=wt2html,html2html Accept empty td cell attribute !! wikitext {| -| align="center" | foo || | +| align="center" |foo|| | |} !! html - +
                        foo foo
                        @@ -26859,13 +26616,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 @@ -26874,13 +26631,13 @@ Non-empty attributes in th-cells Accept empty attributes in th-cells !! wikitext {| -!| foo !!| bar +!|foo!!|bar |} !! html - - +
                        foo bar +foobar
                        !!end @@ -26889,17 +26646,17 @@ Accept empty attributes in th-cells Empty table rows go away !! wikitext {| -| Hello -| there +|Hello +|there |- class="foo" |- |} !! html - -
                        Hello +Hello there +there
                        @@ -26929,11 +26686,9 @@ RT-ed inter-element separators should be valid separators !!end -# Parsoid-only since PHP parser relies on Tidy for correct output +# Parsoid-only test of a DOM pass !!test Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out -!!options -parsoid !! wikitext {| |foo @@ -26943,7 +26698,7 @@ bar {| |foo |} -!! html +!! html/parsoid @@ -27043,13 +26798,13 @@ Indent and comment before table row !! wikitext {| |- - | there + |there |} !! html/php
                        foo

                        bar

                        -
                        there +there
                        !! html/parsoid @@ -27982,7 +27737,7 @@ parsoid=html2wt !! html/parsoid
                        • a
                          b
                        • c
                        !! wikitext -* a
                        b +* a
                        b * c !! end @@ -28515,7 +28270,7 @@ WTS of autolinks with nowikis (round-trip) !! wikitext xhttp://cscott.netx !! html/parsoid -

                        xhttp://cscott.netx

                        +

                        xhttp://cscott.netx

                        !! end # this is the "easy" test because it leaves in place all the @@ -28583,18 +28338,25 @@ Magic links inside links (not autolinked) [http://foo.com PMID 1234] [http://foo.com ISBN 123456789x] !! html+tidy -

                        http://example.com RFC 1234 PMID 1234 ISBN 123456789x

                        -

                        http://example.com RFC 1234 PMID 1234 ISBN 123456789x

                        +

                        http://example.com +RFC 1234 +PMID 1234 +ISBN 123456789x +

                        http://example.com +RFC 1234 +PMID 1234 +ISBN 123456789x +

                        !! html/parsoid

                        http://example.com RFC 1234 PMID 1234 ISBN 123456789x

                        -

                        http://example.com -RFC 1234 -PMID 1234 -ISBN 123456789x

                        +

                        http://example.com +RFC 1234 +PMID 1234 +ISBN 123456789x

                        !! end !! test @@ -28605,38 +28367,14 @@ Magic links inside image captions (autolinked) [[File:Foobar.jpg|thumb|PMID 1234]] [[File:Foobar.jpg|thumb|ISBN 123456789x]] !! html+tidy -
                        - -
                        -
                        -
                        - -
                        -
                        -
                        -
                        - -
                        -
                        -
                        - -
                        -!! html/parsoid -
                        http://example.com
                        -
                        RFC 1234
                        -
                        PMID 1234
                        + + + + +!! html/parsoid +
                        http://example.com
                        +
                        RFC 1234
                        +
                        PMID 1234
                        ISBN 123456789x
                        !! end @@ -28699,31 +28437,34 @@ parsoid=html2wt,wt2wt |- |- |- -|
                        +|
                        - -|
                        +|
                        - |} !! html/php+tidy + + + - - - - - - - + + - - - -
                        - +- +
                        --
                        --
                        - +- +
                        -
                        -

                        -

                        +
                        -
                        -

                        -

                        +

                        - +

                        +
                        +

                        - +

                        + !! end !! test @@ -28907,7 +28648,7 @@ parsoid=wt2html !! wikitext {{echo|hi}}[http://example.com [[ho]]] !! html/parsoid -

                        hiho

                        +

                        hiho

                        !! end !! test @@ -29151,7 +28892,7 @@ parsoid={ !! html/parsoid

                        foo
                        bar

                        !! wikitext -== foo
                        bar == +== foo
                        bar == !! end !! test @@ -29861,17 +29602,15 @@ parsoid={ !! test Empty LI (T49673) !! wikitext -* a +*a * * -* b -!! html/php+tidy -
                          -
                        • a
                        • +*b +!! html+tidy +
                          • a
                          • -
                          • b
                          • -
                          +
                        • b
                        !! end !! test @@ -29879,13 +29618,9 @@ Thumbnail output !! wikitext [[File:Thumb.png|thumb]] !! html/php+tidy -
                        -
                        Thumb.png -
                        -
                        -
                        -
                        -
                        +
                        Thumb.png
                        +!! html/parsoid +
                        !! end !! test @@ -29899,16 +29634,14 @@ unclosed internal link XSS (T137264)

                        [[#%3Cscript%3Ealert(1)%3C/script%3E|

                        !! end -# Use $wgRawHtml to inject a - + +
                      !! html/php+tidy
                      @@ -29917,19 +29650,99 @@ wgRawHtml=1
                      !! end +!! test +Validating that + + + +But if it's on a line with other content, let it be wrapped. + + bar + +foo + +foo bar + +And the same if we have non-paragraph-breaking whitespace + +foo + +bar +!! html/php +

                      A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph +

                      + + +

                      But if it's on a line with other content, let it be wrapped. +

                      bar +

                      foo +

                      foo bar +

                      And the same if we have non-paragraph-breaking whitespace +

                      foo + +bar +

                      +!! end + +!! test +Validating that isn't wrapped in a paragraph (T186965) +!! options +styletag=1 +!! wikitext +A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph + + + + + +But if it's on a line with other content, let it be wrapped. + + bar + +foo + +foo bar + +And the same if we have non-paragraph-breaking whitespace + +foo + +bar +!! html/php +

                      A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph +

                      + + +

                      But if it's on a line with other content, let it be wrapped. +

                      bar +

                      foo +

                      foo bar +

                      And the same if we have non-paragraph-breaking whitespace +

                      foo + +bar +

                      +!! end + !! test Decoding of HTML entities in headings and links for IDs and link fragments (T103714) !! 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 @@ -29938,7 +29751,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]

                      @@ -29991,17 +29804,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:💩}} @@ -30032,20 +29845,20 @@ wgFragmentMode=[ 'html5', 'legacy' ]

                      #啤酒 #啤酒

                      !! html/parsoid -

                      Foo bar

                      +

                      Foo bar

                      -

                      foo Bar

                      +

                      foo Bar

                      -

                      Тест

                      +

                      Тест

                      -

                      Тест

                      +

                      Тест

                      -

                      тест

                      +

                      тест

                      -

                      Hey < # " > % : '

                      +

                      Hey < # " > % : '

                      #Foo bar #foo Bar #Тест #тест #Hey < # " > % : '

                      -

                      💩

                      +

                      💩

                      #啤酒 #啤酒

                      @@ -30057,17 +29870,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:💩}} @@ -30105,17 +29918,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:💩}} @@ -30152,13 +29965,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 @@ -30172,8 +29988,8 @@ T51672: Test for brackets in attributes of elements in external link texts link span

                      !! html/parsoid -

                      link span -link span

                      +

                      link span +link span

                      !! end !! test @@ -30214,40 +30030,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

                      @@ -30266,13 +30082,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.

                      @@ -30281,13 +30097,13 @@ c

                      Para 3.

                      -

                      1

                      +

                      1

                      a

                      -

                      2

                      +

                      2

                      b

                      -

                      2.1

                      +

                      2.1

                      c

                      @@ -30300,29 +30116,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 @@ -30336,26 +30152,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 @@ -30369,32 +30185,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 @@ -30413,7 +30229,7 @@ parsoid={ a {{echo| -= 1 = +=1= b }} @@ -30423,8 +30239,8 @@ c

                      a

                      - -

                      1

                      + +

                      1

                      b

                      @@ -30443,32 +30259,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 @@ -30486,31 +30302,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 @@ -30524,39 +30340,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 @@ -30570,44 +30386,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 @@ -30623,21 +30439,21 @@ foo

                      a

                      -= b = +=b=

                      c

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

                      foo

                      a

                      -

                      b

                      +

                      b

                      c

                      -

                      d

                      +

                      d

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

                      1

                      +

                      1

                      a

                      -

                      2

                      +

                      2

                      b

                      !! end @@ -30673,15 +30489,103 @@ 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__ +== Heading == +* 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 +

                      Heading[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