# 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 !! article Template:1x !! text {{{1}}} !! endarticle !! test
with attributes (T5202) !! wikitextBluescreen of WikiDeath!! htmlBluescreen of WikiDeath!! end !! testwith width attribute (T5202) !! wikitextNarrow screen goodies!! htmlNarrow screen goodies!! end !! testwith forbidden attribute (T5202) !! wikitext!! htmlNarrow screen goodies!! htmlNarrow screen goodies!! end !! test Entities inside!! wikitextinside nowiki !! wikitext<!! html<!! end !! testwith forbidden attribute values (T5202) !! wikitext!! html/phpNarrow screen goodies!! htmlNarrow screen goodies!! end !! testinside (T15238) !! wikitext !! htmlFoo <nowiki><nowiki>Foo</nowiki>!! end !! testinside of #tag:pre !! wikitext {{#tag:pre|Foo →bar }} !! html/phpFoo →bar!! html/parsoid+standaloneFoo →bar
!! html/parsoid+integratedFoo →bar!! end ## Don't expect this to rt, Parsoid drops the unmatched closing pre tags that ## aren't enclosed in nowikis. !! testand preference (first one wins) !! options parsoid=wt2html !! wikitext <nowiki></nowiki>
<pre> <nowiki> </pre>
!! html/parsoid<nowiki></nowiki>
<pre> <nowiki> </pre>
!! end !! test</pre>
!! end !! test Empty pre; pre inside other HTML tags (T56946) !! wikitext a!! html/phpfooa
!! html/parsoidfooa
!! end !! test HTML pre followed by indent-pre !! wikitextfoofoobar !! htmlfoobar!! end !! test Block tag pre !! wikitextfoo!! html/phpfoo!! html/parsoidfoo!! end ## Hmm, should Parsoid rt this? !! test Pres with newline attributes !! options parsoid=wt2html,html2html !! wikitexthi!! html/phphi!! html/parsoidhi!! end !! test Things that look liketags aren't treated as such !! wikitext Barack Obamaof the United States !! html Barack Obama <President> of the United States <President></President>
!! end ## Remex doesn't account for fostered content. ## The difference between Parsoid and the PHP parser can be attributed to core ## commit 674e8388cba and 710618f89af in Parsoid's repo. Parsoid doesn't ## tokenize unmatched extension tags that shadow html tags as strings to ease ## an escaping mechanism. See the comment in `maybeExtensionTag`. !! test Handle broken pre-like tags (T66025) !! options parsoid=wt2html !! wikitext {{1x|x}}
!! html/phpx<pre!! html/parsoid
x!! end ## Similar to the above, but shows the difference between extension and html tags !! test Less than in attribute position !! wikitext
123123!! html/php123<div
123!! html/parsoid123<div
123!! end !! test Parsoid: handle pre with space after attribute !! options parsoid=wt2html !! wikitext{{1x|foo}}!! html/php{{1x|foo}}!! html/parsoid{{1x|foo}}!! end !! test Self-closed pre !! wikitext !! html/php !! html/parsoid !! end ### ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric) ### !!test HTML-pre: 1. embedded newlines !! wikitextfoofoofoofoo!! html/phpfoofoofoofoo!! html/parsoidfoofoofoofoo!!end !! test HTML-pre: big spaces !! wikitexthaha haha!! html/phphaha haha!! html/parsoidhaha haha!! end !!test HTML-pre: 2: indented text !! wikitextfoo!! htmlfoo!!end !!test HTML-pre: 3: other wikitext !! wikitext* foo # bar = no-h = '' no-italic '' [[ NoLink ]]!! html/php* foo # bar = no-h = '' no-italic '' [[ NoLink ]]!! html/parsoid* foo # bar = no-h = '' no-italic '' [[ NoLink ]]!!end