# 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
''' !! html/php
hi
!! html/parsoid
hi
!! end # Parsoid inserts an empty bold tag pair at the end of the line. # The wikitext contains just the first half of the bold # quote pair. !! test Unclosed and unmatched quotes !! wikitext '''''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. ''Tom'''s car is bigger than ''Susan'''s. Plain ''italic'''s plain !! html/php

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/parsoid

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

!! 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 !! html !! end # this example taken from the [[simple:Moon]] article (T49326) !! test Italics and possessives (1) !! wikitext obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer !! html/php

obtained by Lunar Prospector's gamma-ray spectrometer

!! html/parsoid

obtained 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 !! html

Flaming 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/php

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/parsoid

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.

!! end ### ### 2-quote opening sequence tests ### !! test Italics and bold: 2-quote opening sequence: (2,2) !! wikitext ''foo'' !! html

foo

!! 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 ''foo'''' !! html

foo''

!! end !! test Italics and bold: 2-quote opening sequence: (2,5) !! 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,5-3) !! options parsoid=html2wt !! html/parsoid

foo

!! 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''' !! html

foo

!! end !! test Italics and bold: 3-quote opening sequence: (3,4) !! wikitext '''foo'''' !! html

foo'

!! 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

foo

!! 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

foo

!! 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'' !! html

''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'''' !! html

'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''''' !! html

foo

!! 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''''' !! html

foo

!! 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/php

foo'bar

!! html/parsoid

foo'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''''bar''''' !! html

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''''bar''''' !! html

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''''bar'''''' !! html

foo'bar'

!! end !! test Italics and bold: multiple quote sequences: (3,4,2) !! 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: (3,4,2-2) !! options parsoid=html2wt !! html/parsoid

foo'bar

!! wikitext '''foo''''bar !! end !! test Italics and bold: multiple quote sequences: (3,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: (3,4,3-3) !! options parsoid=html2wt !! html/parsoid

foo'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''''' !! html

this is about foo's family

!! end !! test Italics and bold: other quote tests: (2,(3,3),2) !! wikitext ''this is about '''foo's''' family'' !! html

this 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'''''''s family'' !! html

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''' !! html

this is about foo's family

!!end !! test Italicized possessive !! wikitext The ''[[Main Page]]'''s talk page. !! html/php

The Main Page's talk page.

!! html/parsoid

The 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 |} !! html
a b a b
!! end !! test Bold conversion test !! wikitext a b'''c ''d e'''f'' g h'''i ''j !! options parsoid=wt2html !! html

a b'c d ef g hi j

!! end