["
# Strikethrough text.
- case: strikethrough
input: |
strikethrough text
strikethrough text
out:
type: document
content:
- type: paragraph
content:
- type: formatted
markup: strikethrough
content:
- type: text
text: strikethrough text
- type: text
text: " "
- type: formatted
markup: strikethrough
content:
- type: text
text: strikethrough text
# Definition markup
- case: definition markup
input: Riemannsumme
out:
type: document
content:
- type: paragraph
content:
- type: htmltag
name: dfn
attributes:
- key: title
value: Riemannsumme
content:
- type: text
text: Riemannsumme
# Underline text
- case: underline markup
input: Inserted
out:
type: document
content:
- type: paragraph
content:
- type: formatted
markup: underline
content:
- type: text
text: Inserted
# Fixed-width text
- case: fixed width markup
input: Fixed width text
out:
type: document
content:
- type: paragraph
content:
- type: formatted
markup: code
content:
- type: text
text: Fixed width text
# Blockquote
- case: blockquote markup
input: Blockquote
out:
type: document
content:
- type: paragraph
content:
- type: formatted
markup: blockquote
content:
- type: text
text: Blockquote
# Pre-formatted Text
- case: pre formatted text
input: |
Text is '''preformatted''' and
''markups'' '''''cannot''''' be done
out:
type: document
content:
- type: paragraph
content:
- type: formatted
markup: preformatted
content:
- type: text
text: "Text is '''preformatted''' and \n''markups'' '''''cannot''''' be done"
# A simple list of one item.
- case: list one item
input: "* item"
out:
type: document
content:
- type: list
content:
- type: listitem
kind: unordered
depth: 1
content:
- type: text
text: item
# A ordered list and a unordered list of one item
- case: two simple lists
input: |
* item 1
## item 2
out:
type: document
content:
- type: list
content:
- type: listitem
kind: unordered
depth: 1
content:
- type: text
text: item 1
- type: list
content:
- type: listitem
kind: ordered
depth: 2
content:
- type: text
text: item 2
# Star, Fence, Semicolon should be considered as text in an inline context.
- case: list symbols inline context
input: |
* item 1 #;* bla
abc # def *
out:
type: document
content:
- type: list
content:
- type: listitem
kind: unordered
depth: 1
content:
- type: text
text: "item 1 #;* bla"
- type: paragraph
content:
- type: text
text: "abc # def *"
# A list with multiple different item types and a paragraph
- case: list diverse items
input: |
: item 1
; item 11
*** item 2
## item 3
paragraph
out:
type: document
content:
- type: list
content:
- type: listitem
kind: definition
depth: 1
content:
- type: text
text: item 1
- type: listitem
kind: definitionterm
depth: 1
content:
- type: text
text: item 11
- type: list
content:
- type: listitem
depth: 2
kind: unordered
content:
- type: list
content:
- type: listitem
depth: 3
kind: unordered
content:
- type: text
text: item 2
- type: listitem
depth: 2
kind: ordered
content:
- type: text
text: item 3
- type: paragraph
content:
- type: text
text: paragraph
# Even inside of templates, lists must start on a new line
- case: list in template
input: |
{{test|
* item 1
* item 2}}
out:
type: document
content:
- type: template
name:
- type: text
text: test
content:
- type: templateargument
name: "1"
value:
- type: list
content:
- type: listitem
kind: unordered
depth: 1
content:
- type: text
text: item 1
- type: listitem
kind: unordered
depth: 1
content:
- type: text
text: item 2
# Lists cannot be started mid-line.
- case: list mod line
input: |
{{test| this * is * a test}}
[[this ** '' * as'' * as well]]
out:
type: document
content:
- type: template
name:
- type: text
text: test
content:
- type: templateargument
name: "1"
value:
- type: text
text: "this * is "
- type: htmltag
name: a
attributes: []
content:
- type: text
text: " * a "
- type: text
text: " test"
- type: internalreference
target:
- type: text
text: "this ** "
- type: formatted
markup: italic
content:
- type: text
text: " * as"
- type: formatted
markup: underline
content:
- type: text
text: " * as"
- type: text
text: " well"
options: []
caption: []
# A very simple template
- case: simple template
input: "{{name}}"
out:
type: document
content:
- type: template
name:
- type: text
text: name
content: []
# A sequence of block templates
- case: block template sequence
input: |
{{name}}
{{name}}
out:
type: document
content:
- type: template
name:
- type: text
text: name
content: []
- type: template
name:
- type: text
text: name
content: []
# A sequence of inline templates
- case: inline template sequence
input: |
bla {{name}} and a {{name}}
out:
type: document
content:
- type: paragraph
content:
- type: text
text: "bla "
- type: template
name:
- type: text
text: name
content: []
- type: text
text: " and a "
- type: template
name:
- type: text
text: name
content: []
# A template with list-like name
- case: template listlike name
input: |
{{:name
}}
out:
type: document
content:
- type: template
name:
- type: text
text: ":name"
content: []
# A sequence of unnamed template arguments
- case: anonymous attribute sequence
input: |
{{templatename
|attribute2
|atträöüß3
|attribute4
}}
out:
type: document
content:
- type: template
name:
- type: text
text: templatename
content:
- type: templateargument
name: "1"
value:
- type: paragraph
content:
- type: text
text: attribute2
- type: templateargument
name: "2"
value:
- type: paragraph
content:
- type: text
text: atträöüß3
- type: templateargument
name: "3"
value:
- type: paragraph
content:
- type: text
text: attribute4
# A named argument
- case: named argument
input: "{{name|caption=üäö test}}"
out:
type: document
content:
- type: template
name:
- type: text
text: name
content:
- type: templateargument
name: caption
value:
- type: text
text: üäö test
# Multiple named template arguments
- case: multiple named template arguments
input: "{{templatename|äöütem=2|item3=3|item4=4}}"
out:
type: document
content:
- type: template
name:
- type: text
text: templatename
content:
- type: templateargument
name: äöütem
value:
- type: text
text: "2"
- type: templateargument
name: item3
value:
- type: text
text: "3"
- type: templateargument
name: item4
value:
- type: text
text: "4"
# Mixed named and unnamed arguments
- case: mixed template arguments
input: "{{template1|item2=2|item3=3|item4}}"
out:
type: document
content:
- type: template
name:
- type: text
text: template1
content:
- type: templateargument
name: item2
value:
- type: text
text: "2"
- type: templateargument
name: item3
value:
- type: text
text: "3"
- type: templateargument
name: "1"
value:
- type: text
text: "item4"
# Nested templates
- case: nested templates
input: "{{Thankyou in {{preferred language}}|signature=Me}}"
out:
type: document
content:
- type: template
name:
- type: text
text: "Thankyou in "
- type: template
name:
- type: text
text: "preferred language"
content: []
content:
- type: templateargument
name: signature
value:
- type: text
text: Me
# A simple internal reference
- case: simple internal ref
input: "[[File:Abc]]"
out:
type: document
content:
- type: internalreference
target:
- type: text
text: File:Abc
options: []
caption: []
# An empty internal reference
- case: empty internal ref
input: "[[]]"
out:
type: document
content:
- type: internalreference
target: []
options: []
caption: []
# A simple internal reference with caption
- case: internal ref with caption
input: "[[File:Abc|this is a caption]]"
out:
type: document
content:
- type: internalreference
target:
- type: text
text: File:Abc
options: []
caption:
- type: text
text: this is a caption
# A simple internal reference with options
- case: internal ref with options
input: "[[File:Abc|opt1=value1|opt2=123|this is a caption with '''bold and |special|''' markup]]"
out:
type: document
content:
- type: internalreference
target:
- type: text
text: "File:Abc"
options:
- - type: text
text: "opt1=value1"
- - type: text
text: "opt2=123"
caption:
- type: text
text: "this is a caption with "
- type: formatted
markup: bold
content:
- type: text
text: "bold and |special|"
- type: text
text: " markup"
# Simple table with one cell
- case: single cell table
input: |
{|
| attributevalue = "test" | test
|}
out:
type: document
content:
- type: table
attributes: []
caption_attributes: []
caption: []
rows:
- type: tablerow
attributes: []
cells:
- type: tablecell
attributes:
- key: attributevalue
value: test
header: false
content:
- type: paragraph
content:
- type: text
text: test
# Simple table with caption
- case: table caption
input: |
{|
|+ caption_attribute=value | this is a ''caption''
| attributevalue = "test" | test
|}
out:
type: document
content:
- type: table
attributes: []
caption_attributes:
- key: caption_attribute
value: value
caption:
- type: paragraph
content:
- type: text
text: "this is a "
- type: formatted
markup: italic
content:
- type: text
text: "caption"
rows:
- type: tablerow
attributes: []
cells:
- type: tablecell
attributes:
- key: attributevalue
value: test
header: false
content:
- type: paragraph
content:
- type: text
text: test
# simple heading in template (mediawiki can't do this)
- case: table in template
input: |
{{test|bla=
{|
|+ caption_attribute=value | this is a ''caption''
| attributevalue = "test" | test
|}
}}
out:
type: document
content:
- type: template
name:
- type: text
text: test
content:
- type: templateargument
name: bla
value:
- type: table
attributes: []
caption_attributes:
- key: caption_attribute
value: value
caption:
- type: paragraph
content:
- type: text
text: "this is a "
- type: formatted
markup: italic
content:
- type: text
text: "caption"
rows:
- type: tablerow
attributes: []
cells:
- type: tablecell
attributes:
- key: attributevalue
value: test
header: false
content:
- type: paragraph
content:
- type: text
text: test
# simple heading in template (with hack used in real mediawiki)
- case: table in template mediawiki hack
input: |
{{test|bla=
{{(!}}
{{!+}} caption_attribute=value {{!}} this is a ''caption''
{{!}} attributevalue = "test" {{!}} test
{{!)}}
}}
out:
type: document
content:
- type: template
name:
- type: text
text: test
content:
- type: templateargument
name: bla
value:
- type: table
attributes: []
caption_attributes:
- key: caption_attribute
value: value
caption:
- type: paragraph
content:
- type: text
text: "this is a "
- type: formatted
markup: italic
content:
- type: text
text: "caption"
rows:
- type: tablerow
attributes: []
cells:
- type: tablecell
attributes:
- key: attributevalue
value: test
header: false
content:
- type: paragraph
content:
- type: text
text: test
# Table with multiple rows
- case: multi row table
input: |
{| class="wikitable"
|+ caption
|-
| attributevalue = "test" | test
|-
| test ''2''
|-style="font-style: italic; color: green;"
| test3
| attr4=val | test4
|}
out:
type: document
content:
- type: table
attributes:
- key: class
value: wikitable
caption_attributes: []
caption:
- type: paragraph
content:
- type: text
text: caption
rows:
- type: tablerow
attributes: []
cells:
- type: tablecell
attributes:
- key: attributevalue
value: test
header: false
content:
- type: paragraph
content:
- type: text
text: test
- type: tablerow
attributes: []
cells:
- type: tablecell
attributes: []
header: false
content:
- type: paragraph
content:
- type: text
text: "test "
- type: formatted
markup: italic
content:
- type: text
text: "2"
- type: tablerow
attributes:
- key: style
value: "font-style: italic; color: green;"
cells:
- type: tablecell
attributes: []
header: false
content:
- type: paragraph
content:
- type: text
text: "test3"
- type: tablecell
attributes:
- key: attr4
value: val
header: false
content:
- type: paragraph
content:
- type: text
text: "test4"
# Table with multiple cells on one line
- case: table inline cells
input: |
{|
| attributevalue = "test" | test || cell 2 || || attribute=3 | cell 3
|}
out:
type: document
content:
- type: table
attributes: []
caption_attributes: []
caption: []
rows:
- type: tablerow
attributes: []
cells:
- type: tablecell
attributes:
- key: attributevalue
value: test
header: false
content:
- type: text
text: "test "
- type: tablecell
attributes: []
header: false
content:
- type: text
text: "cell 2 "
- type: tablecell
attributes: []
header: false
content: []
- type: tablecell
attributes:
- key: attribute
value: "3"
header: false
content:
- type: paragraph
content:
- type: text
text: cell 3
# Table with header cells
- case: table header cells
input: |
{|
! Orange !! attribute="test" | Apple
|-
| Bread || Pie !! ''hey!!''
! footer
|}
out:
type: document
content:
- type: table
attributes: []
caption_attributes: []
caption: []
rows:
- type: tablerow
attributes: []
cells:
- type: tablecell
header: true
attributes: []
content:
- type: text
text: "Orange "
- type: tablecell
header: true
attributes:
- key: attribute
value: test
content:
- type: paragraph
content:
- type: text
text: Apple
- type: tablerow
attributes: []
cells:
- type: tablecell
header: false
attributes: []
content:
- type: text
text: "Bread "
- type: tablecell
header: false
attributes: []
content:
- type: text
text: "Pie "
- type: tablecell
header: true
attributes: []
content:
- type: paragraph
content:
- type: formatted
markup: italic
content:
- type: text
text: "hey!!"
- type: tablecell
header: true
attributes: []
content:
- type: paragraph
content:
- type: text
text: footer
# a simple gallery tag
- case: simple gallery
input: |
File:Abc
out:
type: document
content:
- type: gallery
attributes: []
content:
- type: internalreference
target:
- type: text
text: File:Abc
options: []
caption: []
# an empty gallery
- case: empty gallery
input: |
out:
type: document
content:
- type: gallery
attributes: []
content: []
# empty gallery with whitespace
- case: empty whitespace gallery
input: " \n \n\n\n \n\t\n "
out:
type: document
content:
- type: gallery
attributes: []
content: []
# simple gallery with whitespace
- case: simple whitespace gallery
input: " \n \nFile:ABC \n\n \n\t\n "
out:
type: document
content:
- type: gallery
attributes: []
content:
- type: internalreference
target:
- type: text
text: "File:ABC "
caption: []
options: []
# a gallery with figure captions
- case: caption gallery
input: |
File:Abc|this is a figure [[caption]]
File:This is a new file
out:
type: document
content:
- type: gallery
attributes: []
content:
- type: internalreference
target:
- type: text
text: File:Abc
options: []
caption:
- type: text
text: "this is a figure "
- type: internalreference
target:
- type: text
text: caption
caption: []
options: []
- type: internalreference
target:
- type: text
text: File:This is a new file
caption: []
options: []
# template with a heading as content
- case: template with heading content
input: |
{{noprint|
== caption
content
}}
out:
type: document
content:
- type: template
name:
- type: text
text: noprint
content:
- type: templateargument
name: "1"
value:
- type: heading
depth: 2
caption:
- type: text
text: caption
content:
- type: paragraph
content:
- type: text
text: content