!! input
; http://example.com/ : definition
!! result
-<dl><dt> <a href="http://example.com/" class='external'>http://example.com/</a> </dt><dd> definition
+<dl><dt> <a href="http://example.com/" class='external free'>http://example.com/</a> </dt><dd> definition
</dd></dl>
!! end
!! input
;[http://www.google.com/ Google]:Number one search engine
!! result
-<dl><dt><a href="http://www.google.com/" class='external' title="http://www.google.com/">Google</a><span class='urlexpansion'> (<i>http://www.google.com/</i>)</span></dt><dd>Number one search engine
+<dl><dt><a href="http://www.google.com/" class='external text' title="http://www.google.com/">Google</a></dt><dd>Number one search engine
</dd></dl>
!! end
!! input
; news:alt.wikipedia.rox: This isn't even a real newsgroup!
!! result
-<dl><dt> <a href="news:alt.wikipedia.rox" class='external'>news:alt.wikipedia.rox</a></dt><dd> This isn't even a real newsgroup!
+<dl><dt> <a href="news:alt.wikipedia.rox" class='external free'>news:alt.wikipedia.rox</a></dt><dd> This isn't even a real newsgroup!
</dd></dl>
!! end
!! input
; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
!! result
-<dl><dt> <a href="news:alt.wikipedia.rox" class='external'>news:alt.wikipedia.rox</a> -- don't crash or enter an infinite loop
+<dl><dt> <a href="news:alt.wikipedia.rox" class='external free'>news:alt.wikipedia.rox</a> -- don't crash or enter an infinite loop
</dt></dl>
!! end
!! input
; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
!! result
-<dl><dt> <a href="http://www.wikipedia2.org/" class='external' title="http://www.wikipedia2.org/">Wikipedia : The Next Generation</a><span class='urlexpansion'> (<i>http://www.wikipedia2.org/</i>)</span></dt><dd> OK, I made that up
+<dl><dt> <a href="http://www.wikipedia2.org/" class='external text' title="http://www.wikipedia2.org/">Wikipedia : The Next Generation</a></dt><dd> OK, I made that up
</dd></dl>
!! end
!! input
Non-bracketed: http://example.com
!! result
-<p>Non-bracketed: <a href="http://example.com" class='external'>http://example.com</a>
+<p>Non-bracketed: <a href="http://example.com" class='external free'>http://example.com</a>
</p>
!! end
!! input
Numbered: [http://example.com]
!! result
-<p>Numbered: <a href="http://example.com" class='external' title="http://example.com">[1]</a><span class='urlexpansion'> (<i>http://example.com</i>)</span>
+<p>Numbered: <a href="http://example.com" class='external autonumber' title="http://example.com">[1]</a>
</p>
!!end
!! input
Specified text: [http://example.com link]
!! result
-<p>Specified text: <a href="http://example.com" class='external' title="http://example.com">link</a><span class='urlexpansion'> (<i>http://example.com</i>)</span>
+<p>Specified text: <a href="http://example.com" class='external text' title="http://example.com">link</a>
</p>
!!end
!! input
Trail (not sure if this is meant to work): [http://example.com link]s
!! result
-<p>Trail (not sure if this is meant to work): <a href="http://example.com" class='external' title="http://example.com">link</a>s<span class='urlexpansion'> (<i>http://example.com</i>)</span>
+<p>Trail (not sure if this is meant to work): <a href="http://example.com" class='external text' title="http://example.com">link</a>s
</p>
!! end
!! input
http://example.com/1$2345
!! result
-<p><a href="http://example.com/1$2345" class='external'>http://example.com/1$2345</a>
+<p><a href="http://example.com/1$2345" class='external free'>http://example.com/1$2345</a>
</p>
!! end
!! input
[http://example.com/1$2345]
!! result
-<p><a href="http://example.com/1$2345" class='external' title="http://example.com/1$2345">[1]</a><span class='urlexpansion'> (<i>http://example.com/1$2345</i>)</span>
+<p><a href="http://example.com/1$2345" class='external autonumber' title="http://example.com/1$2345">[1]</a>
</p>
!!end
!! input
Link to non-http image, no img tag: ftp://example.com/test.jpg
!! result
-<p>Link to non-http image, no img tag: <a href="ftp://example.com/test.jpg" class='external'>ftp://example.com/test.jpg</a>
+<p>Link to non-http image, no img tag: <a href="ftp://example.com/test.jpg" class='external free'>ftp://example.com/test.jpg</a>
</p>
!! end
!! input
Terminating separator: http://example.com/thing,
!! result
-<p>Terminating separator: <a href="http://example.com/thing" class='external'>http://example.com/thing</a>,
+<p>Terminating separator: <a href="http://example.com/thing" class='external free'>http://example.com/thing</a>,
</p>
!! end
!! input
Intervening separator: http://example.com/1,2,3
!! result
-<p>Intervening separator: <a href="http://example.com/1,2,3" class='external'>http://example.com/1,2,3</a>
+<p>Intervening separator: <a href="http://example.com/1,2,3" class='external free'>http://example.com/1,2,3</a>
</p>
!! end
!! input
Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
!! result
-<p>Old bug with URL in query: <a href="http://example.com/thing?url=http://example.com" class='external' title="http://example.com/thing?url=http://example.com">link</a><span class='urlexpansion'> (<i>http://example.com/thing?url=http://example.com</i>)</span>
+<p>Old bug with URL in query: <a href="http://example.com/thing?url=http://example.com" class='external text' title="http://example.com/thing?url=http://example.com">link</a>
</p>
!! end
!! input
And again with mixed protocols: [ftp://example.com?url=http://example.com link]
!! result
-<p>And again with mixed protocols: <a href="ftp://example.com?url=http://example.com" class='external' title="ftp://example.com?url=http://example.com">link</a><span class='urlexpansion'> (<i>ftp://example.com?url=http://example.com</i>)</span>
+<p>And again with mixed protocols: <a href="ftp://example.com?url=http://example.com" class='external text' title="ftp://example.com?url=http://example.com">link</a>
</p>
!!end
!! input
URL in text: [http://example.com http://example.com]
!! result
-<p>URL in text: <a href="http://example.com" class='external'>http://example.com</a>
+<p>URL in text: <a href="http://example.com" class='external free'>http://example.com</a>
</p>
!! end
!! input
ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
!! result
-<p>ja-style clickable images: <a href="http://example.com" class='external' title="http://example.com"><img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" /></a><span class='urlexpansion'> (<i>http://example.com</i>)</span>
+<p>ja-style clickable images: <a href="http://example.com" class='external text' title="http://example.com"><img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" /></a>
</p>
!!end
!! input
Old & use: http://x&y
!! result
-<p>Old & use: <a href="http://x&y" class='external'>http://x&y</a>
+<p>Old & use: <a href="http://x&y" class='external free'>http://x&y</a>
</p>
!! end
!! input
http://www.jpeg.org
!!result
-<p><a href="http://www.jpeg.org" class='external'>http://www.jpeg.org</a>
+<p><a href="http://www.jpeg.org" class='external free'>http://www.jpeg.org</a>
</p>
!! end
!! input
[http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
!! result
-<p><a href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp" class='external' title="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a><span class='urlexpansion'> (<i>http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp</i>)</span>
+<p><a href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp" class='external autonumber' title="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
</p>
!! end
!! input
[http://www.example.com/foo http://www.example.com/bar]
!! result
-<p><a href="http://www.example.com/foo" class='external' title="http://www.example.com/foo">http://www.example.com/bar</a><span class='urlexpansion'> (<i>http://www.example.com/foo</i>)</span>
+<p><a href="http://www.example.com/foo" class='external text' title="http://www.example.com/foo">http://www.example.com/bar</a>
</p>
!! end
!! input
http://www.example.com/<hello>
!! result
-<p><a href="http://www.example.com/" class='external'>http://www.example.com/</a><hello>
+<p><a href="http://www.example.com/" class='external free'>http://www.example.com/</a><hello>
</p>
!!end
!! input
http://www.example.com/<b>html</b>
!! result
-<p><a href="http://www.example.com/" class='external'>http://www.example.com/</a><b >html</b >
+<p><a href="http://www.example.com/" class='external free'>http://www.example.com/</a><b >html</b >
</p>
!!end
!! input
[http://www.example.com/<hello> stuff]
!! result
-<p><a href="http://www.example.com/" class='external' title="http://www.example.com/"><hello> stuff</a><span class='urlexpansion'> (<i>http://www.example.com/</i>)</span>
+<p><a href="http://www.example.com/" class='external text' title="http://www.example.com/"><hello> stuff</a>
</p>
!!end
!! input
[http://www.example.com/<b>html</b> stuff]
!! result
-<p><a href="http://www.example.com/" class='external' title="http://www.example.com/"><b >html</b > stuff</a><span class='urlexpansion'> (<i>http://www.example.com/</i>)</span>
+<p><a href="http://www.example.com/" class='external text' title="http://www.example.com/"><b >html</b > stuff</a>
</p>
!!end
!! input
http://www.example.com/"hello"
!! result
-<p><a href="http://www.example.com/" class='external'>http://www.example.com/</a>"hello"
+<p><a href="http://www.example.com/" class='external free'>http://www.example.com/</a>"hello"
</p>
!!end
!! input
[http://www.example.com/"hello" stuff]
!! result
-<p><a href="http://www.example.com/" class='external' title="http://www.example.com/">"hello" stuff</a><span class='urlexpansion'> (<i>http://www.example.com/</i>)</span>
+<p><a href="http://www.example.com/" class='external text' title="http://www.example.com/">"hello" stuff</a>
</p>
!!end
!! input
[http://www.example.com\0 test]
!! result
-<p>[<a href="http://www.example.com" class='external'>http://www.example.com</a>\0 test]
+<p>[<a href="http://www.example.com" class='external free'>http://www.example.com</a>\0 test]
</p>
!! end
!! input
[[http://www.example.org]]
!! result
-<p>[<a href="http://www.example.org" class='external' title="http://www.example.org">[1]</a><span class='urlexpansion'> (<i>http://www.example.org</i>)</span>]
+<p>[<a href="http://www.example.org" class='external autonumber' title="http://www.example.org">[1]</a>]
</p>
!! end
!! input
Piped link to URL: [[http://www.example.org|an example URL]]
!! result
-<p>Piped link to URL: [<a href="http://www.example.org|an" class='external' title="http://www.example.org|an">example URL</a><span class='urlexpansion'> (<i>http://www.example.org|an</i>)</span>]
+<p>Piped link to URL: [<a href="http://www.example.org|an" class='external text' title="http://www.example.org|an">example URL</a>]
</p>
!! end
!! input
[[Image:foobar.jpg|thumb|http://example.com]]
!! result
-<div class="thumb tright"><div style="width:182px;"><a href="/wiki/Image:Foobar.jpg" class="internal" title="http://example.com"><img src="/images/3/3a/Foobar.jpg" alt="http://example.com" width="180" height="180" longdesc="/wiki/Image:Foobar.jpg" /></a> <div class="thumbcaption" ><div class="magnify" style="float:right"><a href="/wiki/Image:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="Enlarge" /></a></div><a href="http://example.com" class='external'>http://example.com</a></div></div></div>
+<div class="thumb tright"><div style="width:182px;"><a href="/wiki/Image:Foobar.jpg" class="internal" title="http://example.com"><img src="/images/3/3a/Foobar.jpg" alt="http://example.com" width="180" height="180" longdesc="/wiki/Image:Foobar.jpg" /></a> <div class="thumbcaption" ><div class="magnify" style="float:right"><a href="/wiki/Image:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="Enlarge" /></a></div><a href="http://example.com" class='external free'>http://example.com</a></div></div></div>
!! end
Some text
===Another headline===
!! result
-<table border="0" id="toc"><tr id="toctitle"><td align="center">
-<b>Table of contents</b> <script type="text/javascript">showTocToggle("show","hide")</script></td></tr><tr id="tocinside"><td>
-<div class="tocline"><a href="#Headline_1">1 Headline 1</a><br /></div>
-<div class="tocindent">
-<p><a href="#Subheadline_1">1.1 Subheadline 1</a><br />
-</p>
-<div class="tocindent">
-<div class="tocindent">
-<p><a href="#Skipping_a_level">1.1.1 Skipping a level</a><br />
-</p>
-<div class="tocindent">
-<p><a href="#Skipping_a_level_2">1.1.1.1 Skipping a level</a><br />
-</p>
-</div>
-</div>
+<div id='toc'>
+<div id='toctitle'><h2>Table of contents</h2></div>
+<ul>
+<li class='toclevel-1'><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
+<ul>
+<li class='toclevel-2'><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
+<ul>
+<li class='toclevel-3'><a href="#Skipping_a_level"><span class="tocnumber">1.1.1</span> <span class="toctext">Skipping a level</span></a>
+<ul>
+<li class='toclevel-4'><a href="#Skipping_a_level_2"><span class="tocnumber">1.1.1.1</span> <span class="toctext">Skipping a level</span></a></li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</li>
+<li class='toclevel-1'><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
+<ul>
+<li class='toclevel-2'><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
+</ul>
+</li>
+</ul>
</div>
-</div>
-<div class="tocline"><a href="#Headline_2">2 Headline 2</a><br /></div>
-<div class="tocindent">
-<p><a href="#Another_headline">2.1 Another headline</a><br />
-</p>
-</div>
-</td></tr></table>
+<script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script><div class='visualClear'></div>
<div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Parser_test_script&action=edit&section=1" title="Parser test script">edit</a>]</div><a name="Headline_1"></a><h2> Headline 1 </h2>
<div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Parser_test_script&action=edit&section=2" title="Parser test script">edit</a>]</div><a name="Subheadline_1"></a><h3> Subheadline 1 </h3>
<div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Parser_test_script&action=edit&section=3" title="Parser test script">edit</a>]</div><a name="Skipping_a_level"></a><h5> Skipping a level </h5>
!! input
http://example.com [[Image:foobar.jpg]]
!! result
-<p><a href="http://example.com" class='external'>http://example.com</a> <a href="/wiki/Image:Foobar.jpg" class="image" title="Image:foobar.jpg"><img src="/images/3/3a/Foobar.jpg" alt="Image:foobar.jpg" longdesc="/wiki/Image:Foobar.jpg" /></a>
+<p><a href="http://example.com" class='external free'>http://example.com</a> <a href="/wiki/Image:Foobar.jpg" class="image" title="Image:foobar.jpg"><img src="/images/3/3a/Foobar.jpg" alt="Image:foobar.jpg" longdesc="/wiki/Image:Foobar.jpg" /></a>
</p>
!!end
!! input
http://example.com[[Image:foobar.jpg]]
!! result
-<p><a href="http://example.com" class='external'>http://example.com</a><a href="/wiki/Image:Foobar.jpg" class="image" title="Image:foobar.jpg"><img src="/images/3/3a/Foobar.jpg" alt="Image:foobar.jpg" longdesc="/wiki/Image:Foobar.jpg" /></a>
+<p><a href="http://example.com" class='external free'>http://example.com</a><a href="/wiki/Image:Foobar.jpg" class="image" title="Image:foobar.jpg"><img src="/images/3/3a/Foobar.jpg" alt="Image:foobar.jpg" longdesc="/wiki/Image:Foobar.jpg" /></a>
</p>
!!end
!! input
http://en.wikinews.org/wiki/Wikinews:Workplace
!! result
-<p><a href="http://en.wikinews.org/wiki/Wikinews:Workplace" class='external'>http://en.wikinews.org/wiki/Wikinews:Workplace</a>
+<p><a href="http://en.wikinews.org/wiki/Wikinews:Workplace" class='external free'>http://en.wikinews.org/wiki/Wikinews:Workplace</a>
</p>
!!end