!! html
<ul><li>Item 1</li>
<li>Item 2</li></ul>
-
!! end
!! test
<li>plain<b>bold<i>bold-italic</i></b>plain</li>
<li>plain l'<i>italic</i>plain</li>
<li>plain l'<b>bold</b> plain</li></ul>
-
!! end
# this example taken from the [[simple:Moon]] article (T49326)
<li>There is nowiki.</li></ol>
<ul><li>There is not nowiki.</li>
<li>There is nowiki.</li></ul>
-
!! html/parsoid
<dl><dd data-parsoid='{}'>There is not nowiki.</dd>
<dd data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</dd></dl>
!! html/php
<ul><li>a</li>
<li>b</li></ul>
-
!! html/parsoid
<!--c1--><ul>
<li>a
</p><p>c
</p>
<ul><li>d</li></ul>
-
!! end
!! test
!! html
<dl><dt>name</dt>
<dd>Definition</dd></dl>
-
!! end
!! test
:Indented text
!! html
<dl><dd>Indented text</dd></dl>
-
!! end
!! test
!! html
<dl><dt>name</dt>
<dd>Definition</dd></dl>
-
!!end
!! test
!! html
<dl><dt><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a></dt>
<dd>definition</dd></dl>
-
!! end
!! test
!! html
<dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
<dd>Something about it</dd></dl>
-
!! end
!! test
!! html
<dl><dt><a href="/index.php?title=Help:FAQ&action=edit&redlink=1" class="new" title="Help:FAQ (page does not exist)">Help:FAQ</a></dt>
<dd>The least-read page on Wikipedia</dd></dl>
-
!! end
# At Brion's and JeLuF's insistence... :)
!! html/php
<dl><dt><a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
<dd>This isn't even a real newsgroup!</dd></dl>
-
!! html/parsoid
<dl><dt><a rel="mw:ExtLink" class="external free" href="news:alt.wikipedia.rox" data-parsoid='{"stx":"url"}'>news:alt.wikipedia.rox</a></dt><dd data-parsoid='{"stx":"row"}'>This isn't even a real newsgroup!</dd></dl>
!! end
;news:alt.wikipedia.rox -- don't crash or enter an infinite loop
!! html
<dl><dt><a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a> -- don't crash or enter an infinite loop</dt></dl>
-
!! end
!! test
!! html
<dl><dt><a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia :The Next Generation</a></dt>
<dd>OK, I made that up</dd></dl>
-
!! end
!! test
;<b style="display: inline">bold</b>
!! html
<dl><dt><b style="display: inline">bold</b></dt></dl>
-
!! end
!! test
!! html
<dl><dt>one<br />two</dt>
<dd>two-line fun</dd></dl>
-
!! end
!! test
!! html
<dl><dt>one <b>two : tag <i>fun:</i>:</b></dt>
<dd>def</dd></dl>
-
!! end
!! test
<dl><dt>x</dt>
<dd>a</dd>
<dd>b</dd></dl>
-
!! end
!! test
<dl><dd>i1
<dl><dd>i2
<dl><dd>i3</dd></dl></dd></dl></dd></dl>
-
!! end
!! test
!! html
<dl><dd><dl><dd>i2
<dl><dd>i3</dd></dl></dd></dl></dd></dl>
-
!! end
!! test
:::i3
!! html
<dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
-
!! end
!! test
</td></tr></table></dd></dl>
<ul><li>e</li>
<li>f</li></ul>
-
!!end
!! test
!! html
<dl><dd><dl><dd><dl><dt>t3</dt>
<dd>d3</dd></dl></dd></dl></dd></dl>
-
!! end
<dl><dd><dl><dt><ul><li>foo</li>
<li>bar</li></ul></dt></dl>
<dl><dt>baz</dt></dl></dd></dl>
-
!! html/php+tidy
<dl><dd><dl><dt><ul><li>foo</li>
<li>bar</li></ul></dt></dl>
!! html
<ul><li><dl><dd>d1</dd>
<dd>d2</dd></dl></li></ul>
-
!! end
!! html
<ul><li><dl><dd><dl><dd><dl><dd>d1</dd>
<dd>d2</dd></dl></dd></dl></dd></dl></li></ul>
-
!! end
<dd>d2</dd>
<dt>d3</dt>
<dd>d4</dd></dl></li></ul>
-
!! end
!! html
<ul><li><dl><dd>d1
<dl><dd>d2</dd></dl></dd></dl></li></ul>
-
!! end
!! html
<ol><li><ul><li><dl><dd>d1
<dl><dd><dl><dd>d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
-
!! end
!! html
<dl><dd><ul><li>d1</li>
<li>d2</li></ul></dd></dl>
-
!! end
!! html
<dl><dd><ul><li>d1</li></ul>
<dl><dd><ul><li>d2</li></ul></dd></dl></dd></dl>
-
!! end
!! html
<ul><li><dl><dt>foo</dt>
<dd>bar</dd></dl></li></ul>
-
!! end
!! html
<ul><li><ol><li><dl><dt>foo</dt>
<dd>bar</dd></dl></li></ol></li></ul>
-
!! end
# The Parsoid team disagrees with the PHP parser's seemingly-random
<dl><dt>a</dt>
<dd>
<ul><li>b</li></ul></dd></dl>
-
!! html/parsoid
<dl><dt>a
<dd><ul><li>b</li></ul></dd></dl>
<dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
<dl><dt>boo</dt>
<dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
-
!! html/php+tidy
<ul><li><ol><li><ul><li><ol><li><dl><dt>foo</dt>
<dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dt></dl></li></ul></dd></dl></li></ol></li></ul>
<li><a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
<li><a rel="nofollow" class="external free" href="http://[::FFFF:129.144.52.38]:80/index.html">http://[::FFFF:129.144.52.38]:80/index.html</a></li>
<li><a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
-
!! html/parsoid
<p><a rel="mw:ExtLink" class="external free" href="http://[2404:130:0:1000::187:2]/index.php">http://[2404:130:0:1000::187:2]/index.php</a></p>
<li><a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
<li><a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
<li><a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
-
!! html/parsoid
<p><a rel="mw:ExtLink" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
!! html/php
<ul><li><a href="http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a" class="extiw" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li>
<li><a href="http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a" class="extiw" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li></ul>
-
!! html/php+tidy
<ul><li><a href="http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a" class="extiw" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li>
<li><a href="http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a" class="extiw" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li></ul>
<ul><li>Common list</li>
<li>item 2</li>
<li>item 3</li></ul>
-
!! end
!! test
<ol><li>Numbered list</li>
<li>item 2</li>
<li>item 3</li></ol>
-
!! end
# the switch from level 3 to ordered should not introduce a newline between
<li>Level 1
<ul><li><ul><li>Level 3</li></ul></li></ul></li></ul>
<ol><li><ul><li><ul><li>Level 3, but ordered</li></ul></li></ul></li></ol>
-
!! end
!! test
<li><ul><li>ho</li></ul></li>
<li>hi
<ul><li>ho</li></ul></li></ul>
-
!! html/parsoid
<ul><li>hi</li>
<li><ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>ho</li></ul></li>
!! html/php
<dl><dt>hi</dt>
<dd><li>ho</li></dd></dl>
-
!! html/parsoid
<dl><dt>hi</dt>
<dd><li about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<li>ho</li>"}},"i":0}}]}'>ho</li></dd></dl>
!! html
<ul><li>foo
<ul><li>bar</li></ul></li></ul>
-
!! end
!! test
!! html
<ul><li><ul><li>foo</li></ul></li>
<li>bar</li></ul>
-
!! end
!! test
!! html
<ul><li>
<ul><li>bar</li></ul></li></ul>
-
!! end
!! test
!! html
<ul><li><ul><li></li></ul></li>
<li>bar</li></ul>
-
!! end
!! test
!! html
<ul><li><ul><li></li></ul></li>
<li></li></ul>
-
!! end
!! test
!! html
<ul><li>
<ul><li></li></ul></li></ul>
-
!! end
!! test
***foo
!! html
<ul><li><ul><li><ul><li>foo</li></ul></li></ul></li></ul>
-
!! end
!! test
<ul><li><ul><li>bar</li></ul></li>
<li>baz</li></ul></li>
<li>boo</li></ul>
-
!! end
# XXX this test should be moved to citeParserTests, since it depends
<ul><li>foo</li>
<li>bar</li>
<li>baz</li></ul>
-
!! end
!! test
!! html
<ul><li>foo bar</li>
<li>baz</li></ul>
-
!! end
!! test
<ul><li><pre>foo</pre></li>
<li><pre>bar</pre></li>
<li>zar</li></ul>
-
!! html/parsoid
<ul><li><pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre></li>
<li><pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"bar"}}'>bar</pre></li>
<li>notSOL</li>
<li>item 1</li>
<li>item 2</li></ul>
-
!! end
!! test
<ul><li><ul><li>bar</li></ul></li></ul>
<h2><span class="mw-headline" id="A_heading">A heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: A heading">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
<ul><li>Another list item</li></ul>
-
!!end
!! test
<li>b</li>
<li>c</li>
<li>d</li></ul>
-
!!end
!!test
<li>b</li>
<li>c</li>
<li>d</li></ul>
-
!!end
# FIXME: Parsoid has a dedicated DOM pass to mimic this Tidy-specific li-hack
<li>1</li>
<li>4</li>
<li>19700101000203</li></ul>
-
!! end
!! test
<p>foo
</p>
<ul><li>item 1</li></ul>
-
!! html/parsoid
<p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"{{echo|echo}}","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
<ul about="#mwt4" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"{{echo|inner list}} ","href":"./Template:Inner_list"},"params":{},"i":0}}]}'><li>item 1</li></ul>
{{Precedence5|Bullet}}
!! html/php
<ul><li>Bar</li></ul>
-
!! html/parsoid
<ul typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Precedence5","href":"./Template:Precedence5"},"params":{"1":{"wt":"Bullet"}},"i":0}}]}'><li>Bar</li></ul>
!! end
<dd>Four</dd>
<dt>7</dt>
<dd>{Bullet}</dd></dl>
-
!! html/parsoid
<dl about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Preprocessor precedence 9","href":"./Template:Preprocessor_precedence_9"},"params":{"1":{"wt":"Four"},"2":{"wt":"Bullet"},"3":{"wt":"1"},"4":{"wt":"2"}},"i":0}}]}'>
<dt>4</dt>
<dd>-Three-</dd>
<dt>7</dt>
<dd>raw2</dd></dl>
-
!! html/parsoid
<dl about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Preprocessor precedence 10","href":"./Template:Preprocessor_precedence_10"},"params":{"1":{"wt":"Three"},"2":{"wt":"raw2"},"3":{"wt":"Bullet"},"4":{"wt":"1"},"5":{"wt":"2"}},"i":0}}]}'>
<dt>1</dt>
!! html
<ul><li>a <a href="/index.php?title=Template:Nonexistent&action=edit&redlink=1" class="new" title="Template:Nonexistent (page does not exist)">Template:Nonexistent</a></li>
<li>b <a href="/index.php?title=Template:Nonexistent&action=edit&redlink=1" class="new" title="Template:Nonexistent (page does not exist)">Template:Nonexistent</a></li></ul>
-
!!end
!!test
*irc://
a
!! html/php
<ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
-
!! html/parsoid
<ul><li><a rel="mw:ExtLink" class="external free" href="irc://%0Aa" data-parsoid='{"stx":"url","a":{"href":"irc://%0Aa"},"sa":{"href":"irc://&#x0A;a"}}'>irc://%0Aa</a></li></ul>
!! end
*irc://%0Aa
!! html/php
<ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
-
!! html/parsoid
<ul><li><a rel="mw:ExtLink" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
!! end
<li></li>
<li></li>
<li><a href="/index.php?title=Template:Dynamic&action=edit&redlink=1" class="new" title="Template:Dynamic (page does not exist)">Template:Dynamic</a></li></ul>
-
!! end
### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
:;;;::
!! html/php
<dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
-
!! html/parsoid
<dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
<dd>def</dd>
<dt>title</dt>
<dd>def</dd></dl>
-
!! html/parsoid
<dl><dt>title </dt><dd>def</dd>
<dt>title </dt><dd>def</dd>
!! html/php
<dl><dt>AAA</dt>
<dt>foo:bar</dt></dl>
-
!! html/parsoid
<dl><dt data-parsoid='{"dsr":[0,24,1,0]}'><span typeof="mw:LanguageVariant" data-parsoid='{"tSp":[6]}' data-mw-variant='{"twoway":[{"l":"zh-cn","t":"AAA"},{"l":"zh-tw","t":"BBB"}]}'></span></dt>
<dt data-parsoid='{"dsr":[25,39,1,0]}'><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"foo:bar"}}'></span></dt>
;-{zh-cn:AAA
!! html/php+tidy
<dl><dt><b>foo:bar</b></dt><b>
-<dt>-{zh-cn:AAA</dt></b></dl><p><b>
-</b></p>
+<dt>-{zh-cn:AAA</dt></b></dl>
!! html/parsoid
<dl><dt data-parsoid='{}'><b data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo:bar</b></dt><b data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'>
<dt data-parsoid='{}'>-{zh-cn</dt><dd data-parsoid='{"stx":"row"}'>AAA</dd></b></dl>
!! html/php
<dl><dt>AAA foo:bar bat:baz</dt>
<dd>def</dd></dl>
-
!! html/parsoid
<dl><dt data-parsoid='{"dsr":[0,49,1,0]}'><span typeof="mw:LanguageVariant" data-mw-variant='{"twoway":[{"l":"zh-cn","t":"AAA <span typeof=\"mw:LanguageVariant\" data-mw-variant='{\"filter\":{\"l\":[\"zh-hans\"],\"t\":\"foo:bar\"}}' data-parsoid='{\"fl\":[\"zh-hans\"],\"dsr\":[14,33,null,2]}'></span> <span typeof=\"mw:LanguageVariant\" data-mw-variant='{\"disabled\":{\"t\":\"bat:baz\"}}' data-parsoid='{\"fl\":[\"R\"],\"dsr\":[34,47,null,2]}'></span>"}]}'></span></dt>
<dd data-parsoid='{"stx":"row","dsr":[49,53,1,0]}'>def</dd>
!! html
<ul><li>Foo</li>
<li>Bar</li></ul>
-
!! end
!! test
!! html
<ul><li><ul><li><ul><li><ul><li><ul><li><ul><li><ul><li>Foo</li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li>
<li>Bar</li></ul>
-
!! end
!! test
!! html
<ul><li>Foo</li>
<li>bar</li></ul>
-
!! end
!! test
04=<a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/25px-Foobar.jpg" decoding="async" width="25" height="3" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/38px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg 2x" /></a>
05=<ul><li>foo</li>
<li>bar</li></ul>
-
06=foo
07=<pre>Preformatted
</pre>