# 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)
!! wikitext
Bluescreen of WikiDeath
!! html
Bluescreen of WikiDeath
!! end !! test
 with width attribute (T5202)
!! wikitext
Narrow screen goodies
!! html
Narrow screen goodies
!! end !! test
 with forbidden attribute (T5202)
!! wikitext
Narrow screen goodies
!! html
Narrow screen goodies
!! end !! test Entities inside
!! wikitext
<
!! html
<
!! end !! test
 with forbidden attribute values (T5202)
!! wikitext
Narrow screen goodies
!! html
Narrow screen goodies
!! end !! test inside
 (T15238)
!! wikitext


Foo
!! html
<nowiki>

<nowiki>Foo</nowiki>
!! end !! test inside of #tag:pre !! wikitext {{#tag:pre|Foo →bar}} !! html/php
Foo →bar
!! html/parsoid+standalone
Foo bar
!! html/parsoid+integrated
Foo →bar
!! end ## Don't expect this to rt, Parsoid drops the unmatched closing pre tags that ## aren't enclosed in nowikis. !! test and
 preference (first one wins)
!! options
parsoid=wt2html
!! wikitext


!! html/php
<nowiki>

</nowiki>

<pre> <nowiki> </pre>

!! html/parsoid
<nowiki>

</nowiki>

<pre> <nowiki> </pre>

!! end !! test
inside nowiki !! wikitext
!! html

</pre>

!! end !! test Empty pre; pre inside other HTML tags (T56946) !! wikitext a
foo

!! html/php

a

foo

!! html/parsoid

a

foo

!! end

!! test
HTML pre followed by indent-pre
!! wikitext
foo
bar !! html
foo
bar
!! end !! test Block tag pre !! wikitext

foo

!! html/php

foo

!! html/parsoid

foo

!! end ## Hmm, should Parsoid rt this? !! test Pres with newline attributes !! options parsoid=wt2html,html2html !! wikitext
hi
!! html/php
hi
!! html/parsoid
hi
!! end !! test Things that look like
 tags aren't treated as such
!! wikitext
Barack Obama  of 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/php
x
<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
123
123
!! html/php
123

<div

123
!! html/parsoid
123

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

foo


foo
!! html/php
foo
foo

foo


foo
!! html/parsoid
foo
foo

foo


foo
!!end !! test HTML-pre: big spaces !! wikitext




haha




haha




!! html/php




haha




haha




!! html/parsoid




haha




haha




!! end !!test HTML-pre: 2: indented text !! wikitext
 foo
!! html
 foo
!!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