!! end
-# this example taken from the simple/Moon article
+# this example taken from the [[simple:Moon]] article (bug 47326)
!! test
-Italics and possessives
+Italics and possessives (1)
!! input
obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
!! result
</p>
!! end
+# this example taken from [[en:Flaming Pie]] (bug 49926)
+!! test
+Italics and possessives (2)
+!! input
+'''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes
+!! result
+<p><i><b>Flaming Pie</b></i> is ... released in 1997. In <i>Flaming Pie'</i>s liner notes
+</p>
+!! end
+
+# this example taken from [[en:Dictionary]] (bug 49926)
+!! test
+Italics and possessives (3)
+!! input
+The first monolingual dictionary written in a Romance language was ''Sebastián Covarrubias''' ''Tesoro de la lengua castellana o española'', published in 1611 in Madrid. In 1612 the first edition of the ''Vocabolario dell'[[Accademia della Crusca]]'', for Italian, was published. In 1690 in Rotterdam was published, posthumously, the ''Dictionnaire Universel''.
+!! result
+<p>The first monolingual dictionary written in a Romance language was <i>Sebastián Covarrubias'</i> <i>Tesoro de la lengua castellana o española</i>, published in 1611 in Madrid. In 1612 the first edition of the <i>Vocabolario dell'<a href="/index.php?title=Accademia_della_Crusca&action=edit&redlink=1" class="new" title="Accademia della Crusca (page does not exist)">Accademia della Crusca</a></i>, for Italian, was published. In 1690 in Rotterdam was published, posthumously, the <i>Dictionnaire Universel</i>.
+</p>
+!! end
+
+
###
### 2-quote opening sequence tests
###
</pre>
!! end
+!! test
+Tabs don't trigger preformatted text
+!! input
+ This is not
+ preformatted text.
+ This is preformatted text.
+ So is this.
+!! result
+<p> This is not
+ preformatted text.
+</p>
+<pre>This is preformatted text.
+ So is this.
+</pre>
+!! end
+
!! test
Ident preformatting with inline content
!! input
!! end
+# Expected output in the following test is not really expected (there should be
+# <pre> in the output) -- it's only testing for well-formedness.
!! test
Bug 6200: Preformatted in <blockquote>
!! input
</blockquote>
!! result
<blockquote>
-<pre>Blah
-</pre>
-</blockquote>
-
-!! end
-
-!! test
-Bug 51086: Double newlines in blockquotes should be turned into paragraphs
-!! input
-<blockquote>
-Foo
-
-Bar
-</blockquote>
-!! result
-<blockquote>
-<p>Foo
-</p><p>Bar
-</p>
-</blockquote>
-
-!! end
-
-!! test
-Bug 15491: <ins>/<del> in blockquote
-!! input
-<blockquote>
-Foo <del>bar</del> <ins>baz</ins> quux
-</blockquote>
-!! result
-<blockquote>
-<p>Foo <del>bar</del> <ins>baz</ins> quux
-</p>
-</blockquote>
-
-!! 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 <p> tag. (see comment 23-25 of bug #6200)
-!! test
-Bug 15491: <ins>/<del> in blockquote (2)
-!! input
-<blockquote>Foo <del>bar</del> <ins>baz</ins> quux
-</blockquote>
-!! result
-<blockquote>Foo <del>bar</del> <ins>baz</ins> quux
+ Blah
</blockquote>
!! end
</pre>
</center>
<blockquote>
-<pre>foo
-</pre>
+ foo
</blockquote>
<table><tr><td>
<pre>foo
!!end
!!test
-Single-comment whitespace lines dont break lists, and so do multi-comment whitespace lines
+Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
!!input
*a
<!--This line will NOT split the list-->
!!end
+!!test
+Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
+!!input
+*a
+<!--This line will NOT split the list-->
+*b
+ <!--This line will NOT split the list either-->
+*c
+ <!--foo--> <!----> <!--This line NOT split the list
+ either-->
+*d
+!!result
+<ul><li>a
+</li><li>b
+</li><li>c
+</li><li>d
+</li></ul>
+
+!!end
+
!!test
Test the li-hack
(Cannot test this with PHP parser since it relies on Tidy for the hack)
* image6
</gallery>
!! result
-<ul class="gallery">
+<ul class="gallery mw-gallery-traditional">
<li class="gallerybox" style="width: 155px"><div style="width: 155px">
- <div style="height: 150px;">Image1.png</div>
+ <div class="thumb" style="height: 150px;">Image1.png</div>
<div class="gallerytext">
</div>
</div></li>
<li class="gallerybox" style="width: 155px"><div style="width: 155px">
- <div style="height: 150px;">Image2.gif</div>
+ <div class="thumb" style="height: 150px;">Image2.gif</div>
<div class="gallerytext">
<p>||||
</p>
</div>
</div></li>
<li class="gallerybox" style="width: 155px"><div style="width: 155px">
- <div style="height: 150px;">Image3</div>
+ <div class="thumb" style="height: 150px;">Image3</div>
<div class="gallerytext">
</div>
</div></li>
<li class="gallerybox" style="width: 155px"><div style="width: 155px">
- <div style="height: 150px;">Image4</div>
+ <div class="thumb" style="height: 150px;">Image4</div>
<div class="gallerytext">
<p>300px| centre
</p>
</div>
</div></li>
<li class="gallerybox" style="width: 155px"><div style="width: 155px">
- <div style="height: 150px;">Image5.svg</div>
+ <div class="thumb" style="height: 150px;">Image5.svg</div>
<div class="gallerytext">
<p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
</p>
</div>
</div></li>
<li class="gallerybox" style="width: 155px"><div style="width: 155px">
- <div style="height: 150px;">* image6</div>
+ <div class="thumb" style="height: 150px;">* image6</div>
<div class="gallerytext">
</div>
</div></li>
image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
</gallery>
!! result
-<ul class="gallery" style="max-width: 226px;_width: 226px;">
+<ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
<li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
<li class="gallerybox" style="width: 105px"><div style="width: 105px">
- <div style="height: 70px;">Nonexistant.jpg</div>
+ <div class="thumb" style="height: 70px;">Nonexistant.jpg</div>
<div class="gallerytext">
<p>caption
</p>
</div>
</div></li>
<li class="gallerybox" style="width: 105px"><div style="width: 105px">
- <div style="height: 70px;">Nonexistant.jpg</div>
+ <div class="thumb" style="height: 70px;">Nonexistant.jpg</div>
<div class="gallerytext">
</div>
</div></li>
File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
</gallery>
!! result
-<ul class="gallery">
+<ul class="gallery mw-gallery-traditional">
<li class="gallerybox" style="width: 155px"><div style="width: 155px">
<div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
<div class="gallerytext">
File:Foobar.jpg
</gallery>
!! result
-<ul class="gallery">
+<ul class="gallery mw-gallery-traditional">
<li class="gallerybox" style="width: 155px"><div style="width: 155px">
- <div style="height: 150px;">Nonexistant.jpg</div>
+ <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
<div class="gallerytext">
<p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
caption
</div>
</div></li>
<li class="gallerybox" style="width: 155px"><div style="width: 155px">
- <div style="height: 150px;">Nonexistant.jpg</div>
+ <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
<div class="gallerytext">
<p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
</p>
foobar.jpg
</gallery>
!! result
-<ul class="gallery">
+<ul class="gallery mw-gallery-traditional">
<li class="gallerybox" style="width: 155px"><div style="width: 155px">
- <div style="height: 150px;">Nonexistant.jpg</div>
+ <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
<div class="gallerytext">
</div>
</div></li>
<li class="gallerybox" style="width: 155px"><div style="width: 155px">
- <div style="height: 150px;">Nonexistant.jpg</div>
+ <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
<div class="gallerytext">
</div>
</div></li>
</p>
!! end
+# Expected output in the following test is not necessarily expected (there
+# should probably be <p> tags inside the <blockquote> in the output) -- it's
+# only testing for well-formedness.
!! test
Bug 6200: blockquotes and paragraph formatting
!! input
baz
!! result
<blockquote>
-<p>foo
-</p>
+foo
</blockquote>
<p>bar
</p>
# Bug 6200: <blockquote> should behave like <div> with respect to line breaks
!! test
Bug 6200: paragraphs inside blockquotes (no extra line breaks)
+!! options
+disabled
!! input
<blockquote>Line one
!! test
Bug 6200: paragraphs inside blockquotes (extra line break on open)
+!! options
+disabled
!! input
<blockquote>
Line one
!! test
Bug 6200: paragraphs inside blockquotes (extra line break on close)
+!! options
+disabled
!! input
<blockquote>Line one
!! test
Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
+!! options
+disabled
!! input
<blockquote>
Line one
File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
</gallery>
!! result
-<ul class="gallery">
+<ul class="gallery mw-gallery-traditional">
<li class="gallerybox" style="width: 155px"><div style="width: 155px">
<div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/InterWikiLink"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
<div class="gallerytext">
File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
</gallery>
!! result
-<ul class="gallery">
+<ul class="gallery mw-gallery-traditional">
<li class="gallerybox" style="width: 155px"><div style="width: 155px">
<div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="http://www.example.org"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
<div class="gallerytext">
File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
</gallery>
!! result
-<ul class="gallery">
+<ul class="gallery mw-gallery-traditional">
<li class="gallerybox" style="width: 155px"><div style="width: 155px">
<div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/%22_onclick%3D%22alert(%27malicious_javascript_code!%27);"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
<div class="gallerytext">
File:foobar.jpg|link=<
</gallery>
!! result
-<ul class="gallery">
+<ul class="gallery mw-gallery-traditional">
<li class="gallerybox" style="width: 155px"><div style="width: 155px">
<div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
<div class="gallerytext">