# this example taken from [[en:Flaming Pie]] (T51926)
!! test
Italics and possessives (2)
!! wikitext
'''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes
!! html
<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]] (T51926)
!! test
Italics and possessives (3)
!! wikitext
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''.
!! html/php
<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="/wiki/Accademia_della_Crusca" title="Accademia della Crusca">Accademia della Crusca</a></i>, for Italian, was published. In 1690 in Rotterdam was published, posthumously, the <i>Dictionnaire Universel</i>.
</p>
!! html/parsoid
<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 rel="mw:WikiLink" href="./Accademia_della_Crusca" title="Accademia della Crusca" data-parsoid='{"stx":"simple","a":{"href":"./Accademia_della_Crusca"},"sa":{"href":"Accademia della Crusca"}}'>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
###
!! test
Italics and bold: 2-quote opening sequence: (2,2)
!! wikitext
''foo''
!! html
<p><i>foo</i>
</p>
!! end
!! test
Italics and bold: 2-quote opening sequence: (2,3)
!! wikitext
''foo'''
!! html/*
<p><i>foo'</i>
</p>
!! end
!! test
Italics and bold: 2-quote opening sequence: (2,4)
!! options
parsoid=wt2html
!! wikitext
''foo''''
!! html/*
<p><i>foo''</i>
</p>
!! end
# same html as previous, but wikitext adjusted to match parsoid html2wt
!! test
Italics and bold: 2-quote opening sequence: (2,4) w/ nowiki
!! wikitext
''foo<nowiki>''</nowiki>''
!! html
<p><i>foo''</i>
</p>
!! end
!! test
Italics and bold: 2-quote opening sequence: (2,5)
!! options
parsoid=wt2html
!! wikitext
''foo'''''
!! html
<p><i>foo</i><b></b>
</p>
!! end
# same html as previous, but wikitext adjusted to match parsoid html2wt
!! test
Italics and bold: 2-quote opening sequence: (2,5-3)
!! options
parsoid=html2wt
!! html/parsoid
<p><i>foo</i><b></b>
</p>
!! wikitext
''foo''
!! end
###
### 3-quote opening sequence tests
###
!! test
Italics and bold: 3-quote opening sequence: (3,2)
!! wikitext
'''foo''
!! html
<p>'<i>foo</i>
</p>
!! end
!! test
Italics and bold: 3-quote opening sequence: (3,3)
!! wikitext
'''foo'''
!! html
<p><b>foo</b>
</p>
!! end
!! test
Italics and bold: 3-quote opening sequence: (3,4)
!! wikitext
'''foo''''
!! html
<p><b>foo'</b>
</p>
!! end
# The PHP parser strips the empty tags out for giggles; parsoid doesn't.
!! test
Italics and bold: 3-quote opening sequence: (3,5)
!! options
parsoid=wt2html
!! wikitext
'''foo'''''
!! html
<p><b>foo</b><i></i>
</p>
!! end
# same html as previous, but wikitext adjusted to match parsoid html2wt
!! test
Italics and bold: 3-quote opening sequence: (3,5-2)
!! options
parsoid=html2wt
!! html/parsoid
<p><b>foo</b><i></i>
</p>
!! wikitext
'''foo'''
!! end
###
### 4-quote opening sequence tests
###
!! test
Italics and bold: 4-quote opening sequence: (4,2)
!! options
parsoid=wt2html
!! wikitext
''''foo''
!! html/*
<p>''<i>foo</i>
</p>
!!end
# same html as previous, but wikitext adjusted to match parsoid html2wt
!! test
Italics and bold: 4-quote opening sequence: (4,2) w/ nowiki
!! wikitext
<nowiki>''</nowiki>''foo''
!! html
<p>''<i>foo</i>
</p>
!! end
!! test
Italics and bold: 4-quote opening sequence: (4,3)
!! wikitext
''''foo'''
!! html/*
<p>'<b>foo</b>
</p>
!!end
!! test
Italics and bold: 4-quote opening sequence: (4,4)
!! options
parsoid=wt2html
!! wikitext
''''foo''''
!! html/*
<p>'<b>foo'</b>
</p>
!!end
# same html as previous, but wikitext adjusted to match parsoid html2wt
!! test
Italics and bold: 4-quote opening sequence: (4,4) w/ nowiki
!! wikitext
'<nowiki/>'''foo''''
!! html
<p>'<b>foo'</b>
</p>
!! end
# The PHP parser strips the empty tags out for giggles; parsoid doesn't.
!! test
Italics and bold: 4-quote opening sequence: (4,5)
!! options
parsoid=wt2html
!! wikitext
''''foo'''''
!! html
<p>'<b>foo</b><i></i>
</p>
!!end
# same html as previous, but wikitext adjusted to match parsoid html2wt
!! test
Italics and bold: 4-quote opening sequence: (4,5-2)
!! options
parsoid=html2wt
!! html/parsoid
<p>'<b>foo</b><i></i>
</p>
!! wikitext
''''foo'''
!! end
###
### 5-quote opening sequence tests
###
!! test
Italics and bold: 5-quote opening sequence: (5,2)
!! options
parsoid=wt2html
!! wikitext
'''''foo''
!! html/*
<p><b><i>foo</i></b>
</p>
!! end
# same html as previous, but wikitext adjusted to match parsoid html2wt
!! test
Italics and bold: 5-quote opening sequence: (5,2+3)
!! wikitext
'''''foo'''''
!! html/*
<p><i><b>foo</b></i>
</p>
!! end
!! test
Italics and bold: 5-quote opening sequence: (5,3)
!! options
parsoid=wt2html
!! wikitext
'''''foo'''
!! html/*
<p><i><b>foo</b></i>
</p>
!! end
# same html as previous, but wikitext adjusted to match parsoid html2wt
!! test
Italics and bold: 5-quote opening sequence: (5,3+2)
!! wikitext
'''''foo'''''
!! html
<p><i><b>foo</b></i>
</p>
!! end
!! test
Italics and bold: 5-quote opening sequence: (5,4)
!! options
parsoid=wt2html
!! wikitext
'''''foo''''
!! html/*
<p><i><b>foo'</b></i>
</p>
!! end
!! test
Italics and bold: 5-quote opening sequence: (5,5)
!! wikitext
'''''foo'''''
!! html
<p><i><b>foo</b></i>
</p>
!! end
!! test
Italics and bold: 5-quote opening sequence: (5,6)
!! wikitext
'''''foo''''''
!! html/*
<p><i><b>foo'</b></i>
</p>
!! end
###
### multiple quote sequences in a line
###
!! test
Italics and bold: multiple quote sequences: (2,4,2)
!! options
parsoid=wt2html
!! wikitext
''foo''''bar''
!! html/php
<p><i>foo'<b>bar</b></i><b></b>
</p>
!! html/parsoid
<p><i>foo'<b>bar</b></i>
</p>
!! end
# same html as previous, but wikitext adjusted to match parsoid html2wt
!! test
Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki
!! wikitext
''foo'<nowiki/>'''bar'''''
!! html
<p><i>foo'<b>bar</b></i>
</p>
!! end
!! test
Italics and bold: multiple quote sequences: (2,4,3)
!! options
parsoid=wt2html
!! wikitext
''foo''''bar'''
!! html/*
<p><i>foo'<b>bar</b></i>
</p>
!! end
# same html as previous, but wikitext adjusted to match parsoid html2wt
!! test
Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki
!! wikitext
''foo'<nowiki/>'''bar'''''
!! html
<p><i>foo'<b>bar</b></i>
</p>
!! end
!! test
Italics and bold: multiple quote sequences: (2,4,4)
!! options
parsoid=wt2html
!! wikitext
''foo''''bar''''
!! html/*
<p><i>foo'<b>bar'</b></i>
</p>
!! end
# same html as previous, but wikitext adjusted to match parsoid html2wt
!! test
Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki
!! wikitext
''foo'<nowiki/>'''bar'<nowiki/>'''''
!! html
<p><i>foo'<b>bar'</b></i>
</p>
!! end
!! test
Italics and bold: multiple quote sequences: (3,4,2)
!! options
parsoid=wt2html
!! wikitext
'''foo''''bar''
!! html
<p><b>foo'</b>bar<i></i>
</p>
!! end
# same html as previous, but wikitext adjusted to match parsoid html2wt
!! test
Italics and bold: multiple quote sequences: (3,4,2-2)
!! options
parsoid=html2wt
!! html/parsoid
<p><b>foo'</b>bar<i></i>
</p>
!! wikitext
'''foo''''bar
!! end
!! test
Italics and bold: multiple quote sequences: (3,4,3)
!! options
parsoid=wt2html
!! wikitext
'''foo''''bar'''
!! html
<p><b>foo'</b>bar<b></b>
</p>
!! end
# same html as previous, but wikitext adjusted to match parsoid html2wt
!! test
Italics and bold: multiple quote sequences: (3,4,3-3)
!! options
parsoid=html2wt
!! html/parsoid
<p><b>foo'</b>bar<b></b>
</p>
!! wikitext
'''foo''''bar
!! end
###
### other quote tests
###
!! test
Italics and bold: other quote tests: (2,3,5)
!! wikitext
''this is about '''foo's family'''''
!! html
<p><i>this is about <b>foo's family</b></i>
</p>
!! end
!! test
Italics and bold: other quote tests: (2,(3,3),2)
!! wikitext
''this is about '''foo's''' family''
!! html
<p><i>this is about <b>foo's</b> family</i>
</p>
!! end
!! test
Italics and bold: other quote tests: (3,2,3,2)
!! options
parsoid=wt2html
!! wikitext
'''this is about ''foo'''s family''
!! html/*
<p><b>this is about <i>foo</i></b><i>s family</i>
</p>
!!end
# same html as previous, but wikitext adjusted to match parsoid html2wt
!! test
Italics and bold: other quote tests: (3,2,3+2+2,2)