local $/; require 't/runtests.pl'; runtests( data => , dialect => 'MediaWiki', wiki_uri => 'http://www.test.com/wiki/' ); close DATA; __DATA__ external link __H__

[http://example.com]

__W__ [http://example.com [http://example.com]] __NEXT__ nowiki template __H__

mark stubs with {{stub}}

__W__ mark stubs with {{stub}} __NEXT__ nowiki quoted __H__

what happens to 'quoted text'?

__W__ what happens to 'quoted text'? __NEXT__ nowiki doubly quoted __H__

how about ''doubly quoted''?

__W__ how about ''doubly quoted''? __NEXT__ nowiki triply quoted __H__

and '''triply quoted'''?

__W__ and '''triply quoted'''? __NEXT__ nowiki hr __H__

----

__W__ ---- __NEXT__ nowiki ul __H__

* ul

__W__ * ul __NEXT__ nowiki ol __H__

# ol

__W__ # ol __NEXT__ nowiki def __H__

; def

__W__ ; def __NEXT__ nowiki indent __H__

: indent

__W__ : indent __NEXT__ nowiki internal links __H__

an [[internal]] link

__W__ an [[internal]] link __NEXT__ nowiki table markup __H__

{|
| table
|}

__W__ {|
| table
|} __NEXT__ nowiki ext link __H__

[http://example.com]

__W__ [http://example.com] __NEXT__ (bug #46453) triggering too often __H__ x:bla __W__ ''x'':bla __NEXT__ do not add a tag only if offending character(s) occur at the beginning of text node __H__

text *

text #

text ;

text :

text =

text !

text |

text ----

text {| __W__ text '''*''' text '''#''' text ''';''' text ''':''' text '''=''' text '''!''' text '''|''' text '''----''' text '''{|''' __NEXT__ tr attributes __H__
ok
__W__ {| |- align="left" valign="top" | ok |} __NEXT__ preserve cite __H__ text __W__ text __NEXT__ preserve var __H__ text __W__ text __NEXT__ preserve blockquote __H__

text
__W__
text
__NEXT__ preserve ruby __H__ text __W__ text __NEXT__ preserve rb __H__ text __W__ text __NEXT__ preserve rt __H__ text __W__ text __NEXT__ preserve rp __H__ text __W__ text __NEXT__ preserve div __H__
ok
__W__
ok
__NEXT__ empty line break __H__

__W__
__NEXT__ br attribs __H__ ok
__W__ ok
__NEXT__ wrap in html __H__ GOOGLE
NewLine __W__ [http://google.com GOOGLE]
NewLine __NEXT__ bold __H__ bold __W__ '''bold''' __NEXT__ italics __H__ italics __W__ ''italics'' __NEXT__ bold and italics __H__ bold and italics __W__ '''bold''' and ''italics'' __NEXT__ bold-italics nested __H__ bold-italics nested __W__ '''''bold-italics'' nested''' __NEXT__ strong __H__ strong __W__ '''strong''' __NEXT__ emphasized __H__ emphasized __W__ ''emphasized'' __NEXT__ underlined __H__ underlined __W__ underlined __NEXT__ strikethrough __H__ strike __W__ strike __NEXT__ deleted __H__ deleted text __W__ deleted text __NEXT__ inserted __H__ inserted __W__ inserted __NEXT__ span tags removed if naked (ie, have no attribs) __H__ text here __W__ text here __NEXT__ strip aname __H__ __W__ __NEXT__ one-line phrasals __H__ phrasals in one line __W__ ''phrasals in one line'' __NEXT__ paragraph blocking __H__

p1

p2

__W__ p1 p2 __NEXT__ lists __H__
  • 1
  • 2
__W__ * 1 * 2 __NEXT__ nested lists __H__
  • 1
    • 1a
    • 1b
  • 2
__W__ * 1 ** 1a ** 1b * 2 __NEXT__ nested lists (different types) __H__
  • 1
    • a
      1. i
    • b
  • 2
    indented
__W__ * 1 ** a **# i ** b * 2 *: indented __NEXT__ hr __H__
__W__ ---- __NEXT__ br __H__

stuff
stuff two

__W__ stuff
stuff two __NEXT__ div __H__
thing
__W__
thing
__NEXT__ div w/ attrs __H__
thing
__W__
thing
__NEXT__ sub __H__

H2O

__W__ H2O __NEXT__ sup __H__

x2

__W__ x2 __NEXT__ center __H__
centered text
__W__
centered text
__NEXT__ small __H__ small text __W__ small text __NEXT__ code __H__ $name = 'stan'; __W__ $name = 'stan'; __NEXT__ tt __H__ tt text __W__ tt text __NEXT__ font-to-span conversion ::TODO("HTML::WikiConverter::Normalizer not doing font-to-span conversion yet") __H__ font __W__ font __NEXT__ font __H__ font __W__ font __NEXT__ pre __H__
this
  is
    preformatted
      text
__W__ this is preformatted text __NEXT__ indent __H__
indented text
__W__ : indented text __NEXT__ nested indent __H__
stuff
double-indented
__W__ : stuff :: double-indented __NEXT__ h1 __H__

h1

__W__ =h1= __NEXT__ h2 __H__

h2

__W__ ==h2== __NEXT__ h3 __H__

h3

__W__ ===h3=== __NEXT__ h4 __H__

h4

__W__ ====h4==== __NEXT__ h5 __H__
h5
__W__ =====h5===== __NEXT__ h6 __H__
h6
__W__ ======h6====== __NEXT__ img __H__ __W__ [[Image:thing.gif]] __NEXT__ table __H__
Stuff
Name David
Age 24
Height 6'
Nested tables
are fun
__W__ {| |+ Stuff |- ! Name | David |- ! Age | 24 |- ! Height | 6' |- | {| | Nested | tables |- | are | fun |} |} __NEXT__ table w/ attrs __H__
Stuff
Name Foo
Age 24
Height 6'
__W__ {| border="1" cellpadding="3" bgcolor="#ffffff" |+ Stuff |- id="first" class="unselected" ! id="thing" bgcolor="black" | Name | Foo |- class="selected" ! Age | 24 |- class="unselected" ! Height | 6' |} __NEXT__ table w/ blocks __H__

Paragraph 1

Paragraph 2

__W__ {| | align="center" | Paragraph 1 Paragraph 2 |} __NEXT__ strip empty aname __H__ some text __W__ some text __NEXT__ wiki link (text == title) __H__ Some wiki page __W__ [[Some wiki page]] __NEXT__ wiki link (text case != title case) __H__ another page __W__ [[another page]] __NEXT__ wiki link (text != title) __H__ some text __W__ [[Another page|some text]] __NEXT__ external links __H__ thing __W__ [http://www.test.com thing] __NEXT__ external links (rel2abs) __H__ thing __W__ [http://www.test.com/thing.html thing] __NEXT__ strip urlexpansion __H__ Google (http://www.google.com) __W__ [http://www.google.com Google] __NEXT__ strip printfooter __H__
Retrieved from blah blah
__W__ __NEXT__ strip catlinks __H__ __W__ __NEXT__ strip editsection __H__ This is great __W__ This is great __NEXT__ escape bracketed urls __H__

This is a text node with what looks like an ext. link [http://example.org].

__W__ This is a text node with what looks like an ext. link [http://example.org]. __NEXT__ line with vertical bar __H__

| a line with a vertical bar

__W__ | a line with a vertical bar __NEXT__ line that starts with a bang __H__

! a line that starts with a bang

__W__ ! a line that starts with a bang __NEXT__ line that looks like a section __H__

= a line that looks like a section

__W__ = a line that looks like a section __NEXT__ pre-many (bug #14527) __H__
preformatted text

with spaces

should produce only one

pre-block
__W__ preformatted text with spaces should produce only one pre-block __NEXT__ pre following pre __H__
preformatted text
more preformatted text
once again
__W__ preformatted text more preformatted text once again __NEXT__ preserve ::preserve_bold(1) __H__ hello __W__ hello __NEXT__ hr under td __H__

__W__ {| | ---- |} __NEXT__ img alt __H__ Just a test __W__ [[Image:thing.gif|Just a test]] __NEXT__ no preserve templates ::preserve_templates(0) __H__ {{template}} __W__ {{template}} __NEXT__ preserve templates ::preserve_templates(1) {{template}} __W__ {{template}} __NEXT__ no preserve nowiki ::preserve_nowiki(0) __H__ hey __W__ hey __NEXT__ preserve nowiki ::preserve_nowiki(1) __H__ hey __W__ hey __NEXT__ preserve image width __H__ The Thing __W__ [[Image:thing.jpg|200px|The Thing]] __NEXT__ tbody and thead fixes (bug #28402) __H__
heading col 1 heading col 2 heading last col
data first col first row data c2 r1 data c3 r1
data c1 r2 data c2 r2 data c3 r2
data c1 r3 data c2 r3 data c3 r3
__W__ {| border="1" |- ! heading col 1 ! heading col 2 ! heading last col |- | data first col first row | data c2 r1 | data c3 r1 |- | data c1 r2 | data c2 r2 | data c3 r2 |- | data c1 r3 | data c2 r3 | data c3 r3 |} __NEXT__ don't pad headings ::pad_headings(0) __H__

Heading

__W__ ==Heading== __NEXT__ table with zeros __H__
0
1
0
1
__W__ {| | 0 |- | 1 |- | 0 |- | 1 |} __NEXT__ (bug #40845) internal links, without wiki_uri __H__ Class Browser __W__ [http://www.test.com/class_browser.html Class Browser] __NEXT__ (bug #40845) internal links, with wiki_uri=base_uri ::wiki_uri('http://www.test.com/') __H__ Class Browser __W__ [[class browser.html|Class Browser]] __NEXT__ (bug #40845) broken links with anchors, without wiki_uri __H__ adding __W__ [http://www.test.com#Adding adding] __NEXT__ (bug #40845) links with anchors, with wiki_uri ::wiki_uri('http://www.test.com/') ::TODO('wiki_uri not working with an ending slash') __H__ adding __W__ [[#Adding|adding]] __NEXT__ (bug #24745) font/span weirdness ::TODO("HTML::WikiConverter::Normalizer doesn't handle this yet"); __H__

The Test Header

__W__ The Test Header __NEXT__ (bug #29342) Tag attributes with 0 ::TODO("this is actually an H::WC-specific bug") __H__
HelloWorld
__W__ {| border="1" cellpadding="3" cellspacing="0" | Hello | World |}