# The parsoid-compatible option below is only relevant when we are running # parser tests in integrated mode with Parsoid. This option is ignored # when this test file is run with Parsoid in standalone mode. !! options parsoid-compatible=wt2html,wt2wt version=2 !! end # This is the standard article assumed to exist. !! article Main Page !! text blah blah !! endarticle !! article Lunar Prospector !! text was flying around the moon !! end !! article Accademia della Crusca !! text foo !! end !! test Quotes !! wikitext Normal text. '''Bold text.''' Normal text. ''Italic text.'' Normal text. '''''Bold italic text.''''' Normal text. !! html
Normal text. Bold text. Normal text. Italic text.
Normal text. Bold italic text. Normal text.
!! end !! test Quotes wrapping HTML table !! wikitext '''hi |
hi |
hi |
Bold italic text with bold deactivated in between.
Bold italic text with italic deactivated in between.
Bold text..
..spanning two paragraphs (should not work).
Bold tag left open
Italic tag left open
Normal text.
This year's election should beat last year's.
Toms car is bigger than Susans.
Plain italic's plain
!! html/parsoidBold italic text with bold deactivated in between.
Bold italic text with italic deactivated in between.
Bold text..
..spanning two paragraphs (should not work).
Bold tag left open
Italic tag left open
Normal text.
This year's election should beat last year's.
Toms car is bigger than Susans.
Plain italic's plain
!! end !! test Italics and bold !! wikitext *plain *plain''italic''plain *plain''italic''plain''italic''plain *plain'''bold'''plain *plain'''bold'''plain'''bold'''plain *plain''italic''plain'''bold'''plain *plain'''bold'''plain''italic''plain *plain''italic'''bold-italic'''italic''plain *plain'''bold''bold-italic''bold'''plain *plain'''''bold-italic'''italic''plain *plain'''''bold-italic''bold'''plain *plain''italic'''bold-italic'''''plain *plain'''bold''bold-italic'''''plain *plain l'''italic''plain *plain l''''bold''' plain !! htmlobtained by Lunar Prospector's gamma-ray spectrometer
!! html/parsoidobtained by Lunar Prospector's gamma-ray spectrometer
!! end # 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 !! htmlFlaming Pie is ... released in 1997. In Flaming Pie's liner notes
!! 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/phpThe 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/parsoidThe 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.
!! end ### ### 2-quote opening sequence tests ### !! test Italics and bold: 2-quote opening sequence: (2,2) !! wikitext ''foo'' !! htmlfoo
!! end !! test Italics and bold: 2-quote opening sequence: (2,3) !! wikitext ''foo''' !! html/*foo'
!! end !! test Italics and bold: 2-quote opening sequence: (2,4) !! options parsoid=wt2html !! wikitext ''foo'''' !! html/*foo''
!! 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 ''foofoo''
!! end !! test Italics and bold: 2-quote opening sequence: (2,5) !! options parsoid=wt2html !! wikitext ''foo''''' !! htmlfoo
!! 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/parsoidfoo
!! wikitext ''foo'' !! end ### ### 3-quote opening sequence tests ### !! test Italics and bold: 3-quote opening sequence: (3,2) !! wikitext '''foo'' !! html'foo
!! end !! test Italics and bold: 3-quote opening sequence: (3,3) !! wikitext '''foo''' !! htmlfoo
!! end !! test Italics and bold: 3-quote opening sequence: (3,4) !! wikitext '''foo'''' !! htmlfoo'
!! 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''''' !! htmlfoo
!! 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/parsoidfoo
!! wikitext '''foo''' !! end ### ### 4-quote opening sequence tests ### !! test Italics and bold: 4-quote opening sequence: (4,2) !! options parsoid=wt2html !! wikitext ''''foo'' !! html/*''foo
!!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''foo
!! end !! test Italics and bold: 4-quote opening sequence: (4,3) !! wikitext ''''foo''' !! html/*'foo
!!end !! test Italics and bold: 4-quote opening sequence: (4,4) !! options parsoid=wt2html !! wikitext ''''foo'''' !! html/*'foo'
!!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 ''foo'
!! 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'foo
!!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'foo
!! wikitext ''''foo''' !! end ### ### 5-quote opening sequence tests ### !! test Italics and bold: 5-quote opening sequence: (5,2) !! options parsoid=wt2html !! wikitext '''''foo'' !! html/*foo
!! 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/*foo
!! end !! test Italics and bold: 5-quote opening sequence: (5,3) !! options parsoid=wt2html !! wikitext '''''foo''' !! html/*foo
!! 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''''' !! htmlfoo
!! end !! test Italics and bold: 5-quote opening sequence: (5,4) !! options parsoid=wt2html !! wikitext '''''foo'''' !! html/*foo'
!! end !! test Italics and bold: 5-quote opening sequence: (5,5) !! wikitext '''''foo''''' !! htmlfoo
!! end !! test Italics and bold: 5-quote opening sequence: (5,6) !! wikitext '''''foo'''''' !! html/*foo'
!! end ### ### multiple quote sequences in a line ### !! test Italics and bold: multiple quote sequences: (2,4,2) !! options parsoid=wt2html !! wikitext ''foo''''bar'' !! html/phpfoo'bar
!! html/parsoidfoo'bar
!! 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'foo'bar
!! end !! test Italics and bold: multiple quote sequences: (2,4,3) !! options parsoid=wt2html !! wikitext ''foo''''bar''' !! html/*foo'bar
!! 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'foo'bar
!! end !! test Italics and bold: multiple quote sequences: (2,4,4) !! options parsoid=wt2html !! wikitext ''foo''''bar'''' !! html/*foo'bar'
!! 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'foo'bar'
!! end !! test Italics and bold: multiple quote sequences: (3,4,2) !! options parsoid=wt2html !! wikitext '''foo''''bar'' !! htmlfoo'bar
!! 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/parsoidfoo'bar
!! wikitext '''foo''''bar !! end !! test Italics and bold: multiple quote sequences: (3,4,3) !! options parsoid=wt2html !! wikitext '''foo''''bar''' !! htmlfoo'bar
!! 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/parsoidfoo'bar
!! wikitext '''foo''''bar !! end ### ### other quote tests ### !! test Italics and bold: other quote tests: (2,3,5) !! wikitext ''this is about '''foo's family''''' !! htmlthis is about foo's family
!! end !! test Italics and bold: other quote tests: (2,(3,3),2) !! wikitext ''this is about '''foo's''' family'' !! htmlthis is about foo's family
!! end !! test Italics and bold: other quote tests: (3,2,3,2) !! options parsoid=wt2html !! wikitext '''this is about ''foo'''s family'' !! html/*this is about foos family
!!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) !! wikitext '''this is about ''foo'''''this is about foos family
!! end !! test Italics and bold: other quote tests: (3,2,3,3) !! wikitext '''this is about ''foo'''s family''' !! html/*'this is about foos family
!!end !! test Italics and bold: other quote tests: (3,(2,2),3) !! wikitext '''this is about ''foo's'' family''' !! htmlthis is about foo's family
!!end !! test Italicized possessive !! wikitext The ''[[Main Page]]'''s talk page. !! html/phpThe Main Page's talk page.
!! html/parsoidThe Main Page's talk page.
!! end !! test Quote balancing context should be restricted to td/th cells on the same wikitext line !! options parsoid=wt2html,wt2wt !! wikitext {| !''a!!''b |''a||''b |} !! htmla | b | a | b |
---|
a b'c d ef g hi j
!! end