============================== Bold + italic markup
This should be '''''bold and italic'''''
------------------------------
<p>
This should be <strong><i>bold and italic</i></strong>
</p>
------------------------------
============================== Consecutive bold + italic markup
'''''one''''', '''''two''''', '''''three''''', '''''four'''''
------------------------------
<p>
<strong><i>one</i></strong>, <strong><i>two</i></strong>, <strong><i>three</i></strong>, <strong><i>four</i></strong>
</p>
------------------------------
============================== Underline + overstrike markup
__~~underlineoversrike~~__
------------------------------
<p>
<span class="underline"><del>underlineoversrike</del></span>
</p>
------------------------------
============================== Problematic markup: overlapping tags
__~~overlapping__tags~~
------------------------------
<p>
<span class="underline"><del>overlapping</del></span><del>tags</del>
</p>
------------------------------
============================== Problematic markup: out of order close tags
__~~outoforderclosetags__~~
------------------------------
<p>
<span class="underline"><del>outoforderclosetags</del></span><del></del>
</p>
------------------------------
============================== Problematic markup: bold + missing close italic
'''''bolditalic''' # Open italic should be closed before paragraph end
------------------------------
<p>
<strong><i>bolditalic</i></strong><i> # Open italic should be closed before paragraph end
</i></p>
------------------------------
============================== Italic immediately followed by bold markup
''italic'''''bold'''
------------------------------
<p>
<i>italic</i><strong>bold</strong>
</p>
------------------------------
============================== Bold immediately followed by italic markup
'''bold'''''italic''
------------------------------
<p>
<strong>bold</strong><i>italic</i>
</p>
------------------------------
============================== Multiline bold italic markup
'''''bold
italic
multiline'''''
------------------------------
<p>
<strong><i>bold
italic
multiline</i></strong>
</p>
------------------------------
============================== Problematic multiline bold italic markup
'''''bold
italic
multiline
without endtags
------------------------------
<p>
<strong><i>bold
italic
multiline
without endtags
</i></strong></p>
------------------------------
============================== Super and subscript markup
^superscript^, ,,subscript,,, normal.
------------------------------
<p>
<sup>superscript</sup>, <sub>subscript</sub>, normal.
</p>
------------------------------
<sup>superscript</sup>, <sub>subscript</sub>, normal.
============================== Escaping markup
!__foo!__
!~~bar!~~
!,,boo!,,
!^baz!^
------------------------------
<p>
__foo__
~~bar~~
,,boo,,
^baz^
</p>
------------------------------
============================== Complex mixed verbatim markup
{{{verbatim}}}
{{{
{{{in `block`
}}}
`{{{this is verbatim}}}` and {{{`that` should also `be` verbatim}}}
------------------------------
<p>
<tt>verbatim</tt>
</p>
<pre class="wiki">{{{in `block`
</pre>
<p>
<tt>{{{this is verbatim}}}</tt> and <tt>`that` should also `be` verbatim</tt>
</p>
------------------------------
<tt>verbatim</tt>
 [&hellip;]
<tt>{{{this is verbatim}}}</tt> and <tt>`that` should also `be` verbatim</tt>
==============================
============================== Link resolvers, short form
link:1

Thing [link:1] Thing[link:2]
------------------------------
<p>
<a class="odd resolver" href="/thing/1">link:1</a>
</p>
<p>
Thing <a class="odd resolver" href="/thing/1">1</a> Thing<a class="even resolver" href="/thing/2">2</a>
</p>
------------------------------
============================== Escaping links resolvers, short form
!link:1
Thing ![link:1 number 1], CS![link:1], ![link:bar]
------------------------------
<p>
link:1
Thing [link:1 number 1], CS[link:1], [link:bar]
</p>
------------------------------
============================== Link resolvers, long form with label
[link:1 thing one], [http://www.edgewall.com/ edgewall]
------------------------------
<p>
<a class="odd resolver" href="/thing/1">thing one</a>, <a class="ext-link" href="http://www.edgewall.com/"><span class="icon"></span>edgewall</a>
</p>
------------------------------
============================== Link resolver SHREF_TARGET_LAST
Add-on to link:123:
Some change.
link:1
This ticket is the first one
link:123>
link:123&
------------------------------
<p>
Add-on to <a class="odd resolver" href="/thing/123">link:123</a>:
Some change.
<a class="odd resolver" href="/thing/1">link:1</a>
This ticket is the first one
<a class="odd resolver" href="/thing/123">link:123</a>&gt;
<a class="odd resolver" href="/thing/123">link:123</a>&amp;
</p>
------------------------------
Add-on to <a class="odd resolver" href="/thing/123">link:123</a>:
Some change.
<a class="odd resolver" href="/thing/1">link:1</a>
This ticket is the first one
<a class="odd resolver" href="/thing/123">link:123</a>&gt;
<a class="odd resolver" href="/thing/123">link:123</a>&amp;
============================== Link resolver SHREF_TARGET_FIRST
<bug>http://localhost/bugzilla/show_bug.cgi?id=1284</bug> 804
------------------------------
<p>
&lt;bug&gt;<a class="ext-link" href="http://localhost/bugzilla/show_bug.cgi?id=1284"><span class="icon"></span>http://localhost/bugzilla/show_bug.cgi?id=1284</a>&lt;/bug&gt; 804
</p>
------------------------------
============================== Link resolver SHREF_TARGET_MIDDLE
||http://example.com/img.png||text||
------------------------------
<table class="wiki">
<tr><td><img src="http://example.com/img.png" alt="http://example.com/img.png" /></td><td>text
</td></tr></table>
------------------------------
||<a class="ext-link" href="http://example.com/img.png"><span class="icon"></span>http://example.com/img.png</a>||text||
============================== Link resolver, long form with quoting
[link:WikiStart Foo] [http://www.edgewall.com/ Edgewall]

link:"Foo Bar" link:"Foo Bar#baz"

[link:"Foo Bar" Foo Bar] [link:"Foo Bar#baz" Foo Bar]

[link:Argv "*argv[] versus **argv"]

[link:test "test.txt", line 123]

[link:pl/de %de]
------------------------------
<p>
<a class="text resolver" href="/stuff/WikiStart">Foo</a> <a class="ext-link" href="http://www.edgewall.com/"><span class="icon"></span>Edgewall</a>
</p>
<p>
<a class="text resolver" href="/stuff/Foo%20Bar">link:"Foo Bar"</a> <a class="text resolver" href="/stuff/Foo%20Bar%23baz">link:"Foo Bar#baz"</a>
</p>
<p>
<a class="text resolver" href="/stuff/Foo%20Bar">Foo Bar</a> <a class="text resolver" href="/stuff/Foo%20Bar%23baz">Foo Bar</a>
</p>
<p>
<a class="text resolver" href="/stuff/Argv">*argv[] versus **argv</a>
</p>
<p>
<a class="text resolver" href="/stuff/test">"test.txt", line 123</a>
</p>
<p>
<a class="text resolver" href="/stuff/pl/de">%de</a>
</p>
------------------------------
============================== Link resolver in markup
'''link:1''', ''link:1'', ~~link:1~~, __link:1__
------------------------------
<p>
<strong><a class="odd resolver" href="/thing/1">link:1</a></strong>, <i><a class="odd resolver" href="/thing/1">link:1</a></i>, <del><a class="odd resolver" href="/thing/1">link:1</a></del>, <span class="underline"><a class="odd resolver" href="/thing/1">link:1</a></span>
</p>
------------------------------
============================== Link resolver, quoting of target
link:1
link:12
link:123
link:'1'
link:'12'
link:'123'
link:"1"
link:"12"
link:"123"
------------------------------
<p>
<a class="odd resolver" href="/thing/1">link:1</a>
<a class="even resolver" href="/thing/12">link:12</a>
<a class="odd resolver" href="/thing/123">link:123</a>
<a class="odd resolver" href="/thing/1">link:'1'</a>
<a class="even resolver" href="/thing/12">link:'12'</a>
<a class="odd resolver" href="/thing/123">link:'123'</a>
<a class="odd resolver" href="/thing/1">link:"1"</a>
<a class="even resolver" href="/thing/12">link:"12"</a>
<a class="odd resolver" href="/thing/123">link:"123"</a>
</p>
------------------------------
============================== Relative links
Relative links are supported:
[../parent See above]
[/docs See documentation]
[/images/logo.png Our logo]
[/]
------------------------------
<p>
Relative links are supported:
<a href="../parent">See above</a>
<a href="/docs">See documentation</a>
<img src="/images/logo.png" alt="Our logo" />
<a href="/">/</a>
</p>
------------------------------
==============================  Image TracLink (DEPRECATED)
http://example.com/img.png?foo=bar
------------------------------
<p>
<img src="http://example.com/img.png?foo=bar" alt="http://example.com/img.png?foo=bar" />
</p>
------------------------------
<a class="ext-link" href="http://example.com/img.png?foo=bar"><span class="icon"></span>http://example.com/img.png?foo=bar</a>
============================== Arbitrary protocol Link
''RFCs von ftp://ftp.rfc-editor.org/in-notes/rfcXXXX.txt''
------------------------------
<p>
<i>RFCs von <a class="ext-link" href="ftp://ftp.rfc-editor.org/in-notes/rfcXXXX.txt"><span class="icon"></span>ftp://ftp.rfc-editor.org/in-notes/rfcXXXX.txt</a></i>
</p>
------------------------------
============================== Another arbitrary protocol Link
svn+ssh://secureserver.org
[svn+ssh://secureserver.org SVN link]
rfc-2396.compatible://link
[rfc-2396.compatible://link RFC 2396]
------------------------------
<p>
<a class="ext-link" href="svn+ssh://secureserver.org"><span class="icon"></span>svn+ssh://secureserver.org</a>
<a class="ext-link" href="svn+ssh://secureserver.org"><span class="icon"></span>SVN link</a>
<a class="ext-link" href="rfc-2396.compatible://link"><span class="icon"></span>rfc-2396.compatible://link</a>
<a class="ext-link" href="rfc-2396.compatible://link"><span class="icon"></span>RFC 2396</a>
</p>
------------------------------
============================== Link resolver counter examples
Test:[[BR]] There should be a line break

Other test:'''bold text''' should be bold
------------------------------
<p>
Test:<br /> There should be a line break
</p>
<p>
Other test:<strong>bold text</strong> should be bold
</p>
------------------------------
Test:  There should be a line break

Other test:<strong>bold text</strong> should be bold
============================== Link resolver counter example
'''Note:'''
------------------------------
<p>
<strong>Note:</strong>
</p>
------------------------------
<strong>Note:</strong>
==============================
============================== Code Block 1
{{{
Preformatted text.
}}}
------------------------------
<pre class="wiki">Preformatted text.
</pre>
------------------------------
 [&hellip;]
============================== Code Block 2
{{{
<b>Preformatted text</b>.
}}}
------------------------------
<pre class="wiki">&lt;b&gt;Preformatted text&lt;/b&gt;.
</pre>
------------------------------
 [&hellip;]
============================== Embedded code blocks
{{{
Outer block.
{{{
Inner block.
}}}
}}}
------------------------------
<pre class="wiki">Outer block.
{{{
Inner block.
}}}
</pre>
------------------------------
 [&hellip;]
============================== Consecutive code blocks
Block 
{{{
number one
}}}
and block
{{{
number two
}}}
------------------------------
<p>
Block 
</p>
<pre class="wiki">number one
</pre>
<p>
and block
</p>
<pre class="wiki">number two
</pre>
------------------------------
Block 
 [&hellip;]
and block
 [&hellip;]
============================== Wiki processor
{{{
#!default
Preformatted text.
}}}
------------------------------
<pre class="wiki">Preformatted text.
</pre>
------------------------------
 [&hellip;]
============================== Wiki processor counter example
{{{
#!/bin/sh
echo "foo"
}}}
------------------------------
<pre class="wiki">#!/bin/sh
echo &#34;foo&#34;
</pre>
------------------------------
 [&hellip;]
============================== HTML wiki processor
{{{
#!html
<p>Hello World</p>
}}}
------------------------------
<p>Hello World</p>
------------------------------
 [&hellip;]
============================== HTML wiki processor, XSS check 1
{{{
#!html
<script>alert("");</script>
}}}
------------------------------

------------------------------
 [&hellip;]
============================== HTML wiki processor, XSS check 2
{{{
#!html
<div onclick="alert('')">Click me</div>
}}}
------------------------------
<div>Click me</div>
------------------------------
 [&hellip;]
============================== Macro with arguments (leading)
[[HelloWorld(hej hopp)]]
------------------------------
<p>
Hello World, args = hej hopp
</p>
------------------------------
[[HelloWorld(...)]]
============================== Macro with arguments (in flow)
Hello, [[HelloWorld(hej hopp)]]
------------------------------
<p>
Hello, Hello World, args = hej hopp
</p>
------------------------------
Hello, [[HelloWorld(...)]]
============================== Bad macro call
[[HelloWorld(hej hopp) ]] # This shouldnt executed as macro since it contain whitespace between ) and ]
------------------------------
<p>
[[HelloWorld(hej hopp) ]] # This shouldnt executed as macro since it contain whitespace between ) and ]
</p>
------------------------------
[[HelloWorld(hej hopp) ]] # This shouldnt executed as macro since it contain whitespace between ) and ]
============================== Another bad macro call
[[HelloWorld(hej hopp))]] # Extra right brace and still executed
------------------------------
<p>
Hello World, args = hej hopp) # Extra right brace and still executed
</p>
------------------------------
[[HelloWorld(...)]] # Extra right brace and still executed
============================== Two consecutive macros on a line
[[HelloWorld(hej hopp)]] [[HelloWorld(hej hopp2)]] # Test non greedy match
------------------------------
<p>
Hello World, args = hej hopp Hello World, args = hej hopp2 # Test non greedy match
</p>
------------------------------
[[HelloWorld(...)]] [[HelloWorld(...)]] # Test non greedy match
============================== Macro returning a <div>
[[DivHelloWorld(hej hopp)]]
------------------------------
<p>
</p><div>Hello World, args = hej hopp</div><p>
</p>
------------------------------
[[DivHelloWorld(...)]]
============================== Macro returning a <div class="...code...">
[[DivCode(hej hopp)]]
------------------------------
<p>
<span class="code-block">Hello World, args = hej hopp</span>
</p>
------------------------------
[[DivCode(...)]]
============================== Macro returning an html.DIV(class="...code...">)
[[DivCodeElement(hej hopp)]]
------------------------------
<p>
<span class="code-block">Hello World, args = hej hopp</span>
</p>
------------------------------
[[DivCodeElement(...)]]
============================== Inlined HTML wiki processor
Inline [[html(<B> Test </B>)]] text
------------------------------
<p>
Inline <b> Test </b> text
</p>
------------------------------
Inline [[html(...)]] text
============================== BR macro
Line break [[BR]] another line[[br]]last line
------------------------------
<p>
Line break <br /> another line<br />last line
</p>
------------------------------
Line break   another line last line
============================== Comment wiki processor
Test comment blocks
{{{
#!comment
This is simply removed from the output
}}}
------------------------------
<p>
Test comment blocks
</p>
------------------------------
Test comment blocks
============================== Comment wiki processor called as a macro
Inline [[comment(This should not be seen)]] comment
------------------------------
<p>
Inline  comment
</p>
------------------------------
Inline  comment
============================== I18N heading
= ça marche! =
------------------------------
<h1 id="çamarche">ça marche!</h1>
------------------------------
= ça marche! =
============================== Quoted heading
= "Test" =
------------------------------
<h1 id="Test">"Test"</h1>
------------------------------
= "Test" =
============================== Heading with < and >
= Foo <Bar> Baz =
------------------------------
<h1 id="FooltBargtBaz">Foo &lt;Bar&gt; Baz</h1>
------------------------------
= Foo &lt;Bar&gt; Baz =
============================== Normal heading
== Heading with trailing white-space == 
------------------------------
<h2 id="Headingwithtrailingwhitespace">Heading with trailing white-space</h2>
------------------------------
== Heading with trailing white-space ==
============================== Formatted heading
== ''Formatted'' ~~Heading~~ ==
------------------------------
<h2 id="FormattedHeading"><i>Formatted</i> <del>Heading</del></h2>
------------------------------
== ''Formatted'' ~~Heading~~ ==
============================== Heading with link
== [wiki:SandBox Linked Heading] ==
------------------------------
<h2 id="LinkedHeading"><a class="missing wiki" href="/wiki/SandBox" rel="nofollow">Linked Heading?</a></h2>
------------------------------
== [wiki:SandBox Linked Heading] ==
============================== Bulleted lists
Paragraph
 * foo bar
   boo baz
   * Subitem
     Subitem line 2
 * item 2
   item 2 line 2
Paragraph
------------------------------
<p>
Paragraph
</p>
<ul><li>foo bar
boo baz
<ul><li>Subitem
Subitem line 2
</li></ul></li><li>item 2
item 2 line 2
</li></ul><p>
Paragraph
</p>
------------------------------
Paragraph
 * foo bar
   boo baz
   * Subitem
     Subitem line 2
 * item 2
   item 2 line 2
Paragraph
============================== Numbered lists
 1. item 1
   a. item 1.a
   a. item 1.b

Some paragraph

 2. continue with item 2
   i. roman 1
   ii. roman 2
Paragraph
------------------------------
<ol><li>item 1
<ol class="loweralpha"><li>item 1.a
</li><li>item 1.b
</li></ol></li></ol><p>
Some paragraph
</p>
<ol start="2"><li>continue with item 2
<ol class="lowerroman"><li>roman 1
</li><li>roman 2
</li></ol></li></ol><p>
Paragraph
</p>
------------------------------
1. item 1
   a. item 1.a
   a. item 1.b

Some paragraph

 2. continue with item 2
   i. roman 1
   ii. roman 2
Paragraph
============================== Numbered lists counter-examples
 This will not start a new numbered
 list. There's more than one character
 before the "."
 OTOH, the following is a roman numbered list:
 iii. start
 xxvii. maximal number in sequence
Paragraph
------------------------------
<blockquote>
<p>
This will not start a new numbered
list. There's more than one character
before the "."
OTOH, the following is a roman numbered list:
</p>
</blockquote>
<ol class="lowerroman"><li>start
</li><li>maximal number in sequence
</li></ol><p>
Paragraph
</p>
------------------------------
============================== Simple definition list
 term:: definition
------------------------------
<dl><dt>term</dt><dd>definition
</dd></dl>
------------------------------
term:: definition
============================== Tricky definition list
 term:: definition:: text
------------------------------
<dl><dt>term</dt><dd>definition:: text
</dd></dl>
------------------------------
term:: definition:: text
============================== Verbatim term in definition list
 `term`:: definition
------------------------------
<dl><dt><tt>term</tt></dt><dd>definition
</dd></dl>
------------------------------
<tt>term</tt>:: definition
============================== Another verbatim term in definition list
 {{{term}}}:: definition
------------------------------
<dl><dt><tt>term</tt></dt><dd>definition
</dd></dl>
------------------------------
<tt>term</tt>:: definition
============================== Complex definition list
 complex topic:: multiline
                 ''formatted''
                 definition
------------------------------
<dl><dt>complex topic</dt><dd>multiline
<i>formatted</i>
definition
</dd></dl>
------------------------------
complex topic:: multiline
                 <i>formatted</i>
                 definition
============================== Definition list counter example
 term::definition
------------------------------
<blockquote>
<p>
term::definition
</p>
</blockquote>
------------------------------
term::definition
============================== Definition list + escaped definition list
 complex topic:: multiline
                 `not:: a dl`
------------------------------
<dl><dt>complex topic</dt><dd>multiline
<tt>not:: a dl</tt>
</dd></dl>
------------------------------
complex topic:: multiline
                 <tt>not:: a dl</tt>
============================== Definition list + another escaped definition list
 complex topic:: multiline
                 {{{not:: a dl}}}
------------------------------
<dl><dt>complex topic</dt><dd>multiline
<tt>not:: a dl</tt>
</dd></dl>
------------------------------
complex topic:: multiline
                 <tt>not:: a dl</tt>
============================== Simple Table, one column
|| a || 
|| b ||
------------------------------
<table class="wiki">
<tr><td> a 
</td></tr><tr><td> b 
</td></tr></table>
------------------------------
|| a || 
|| b ||
============================== Simple Table, multiple columns
in:
|| RPC# || parameter len || ..... parameter ..... ||
out:
|| RPC# || parameter len || ..... parameter ..... ||
----
------------------------------
<p>
in:
</p>
<table class="wiki">
<tr><td> RPC# </td><td> parameter len </td><td> ..... parameter ..... 
</td></tr></table>
<p>
out:
</p>
<table class="wiki">
<tr><td> RPC# </td><td> parameter len </td><td> ..... parameter ..... 
</td></tr></table>
<hr />
------------------------------
in:
|| RPC# || parameter len || ..... parameter ..... ||
out:
|| RPC# || parameter len || ..... parameter ..... ||
----
==============================
============================== General Wiki syntax, mix of headings and lists
= Heading 1 =
Paragraph
 * Item 1
   * Item 2
Another paragraph
------------------------------
<h1 id="Heading1">Heading 1</h1>
<p>
Paragraph
</p>
<ul><li>Item 1
<ul><li>Item 2
</li></ul></li></ul><p>
Another paragraph
</p>
------------------------------
= Heading 1 =
Paragraph
 * Item 1
   * Item 2
Another paragraph
============================== General Wiki syntax: heading, lists and table
Paragraph
----
 1. Item 1
   2. Item 2
||Table||cell||
||Foo||Bar||Baz||
http://www.edgewall.com/
------------------------------
<p>
Paragraph
</p>
<hr />
<ol><li>Item 1
<ol start="2"><li>Item 2
</li></ol></li></ol><table class="wiki">
<tr><td>Table</td><td>cell
</td></tr><tr><td>Foo</td><td>Bar</td><td>Baz
</td></tr></table>
<p>
<a class="ext-link" href="http://www.edgewall.com/"><span class="icon"></span>http://www.edgewall.com/</a>
</p>
------------------------------
Paragraph
----
 1. Item 1
   2. Item 2
||Table||cell||
||Foo||Bar||Baz||
<a class="ext-link" href="http://www.edgewall.com/"><span class="icon"></span>http://www.edgewall.com/</a>
