| 1 |
<?php |
| 2 |
|
| 3 |
namespace MediaWiki\Tests\Parser; |
| 4 |
|
| 5 |
use MediaWiki\Parser\Parser; |
| 6 |
use MediaWiki\Parser\ParserOptions; |
| 7 |
use MediaWiki\Parser\Preprocessor; |
| 8 |
use MediaWiki\Parser\Preprocessor_Hash; |
| 9 |
use MediaWiki\User\User; |
| 10 |
use MediaWikiIntegrationTestCase; |
| 11 |
use Wikimedia\ObjectCache\HashBagOStuff; |
| 12 |
use Wikimedia\ObjectCache\WANObjectCache; |
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
class PreprocessorTest extends MediaWikiIntegrationTestCase { |
| 30 |
|
| 31 |
protected $mOptions; |
| 32 |
|
| 33 |
protected $preprocessor; |
| 34 |
|
| 35 |
protected function setUp(): void { |
| 36 |
parent::setUp(); |
| 37 |
$this->mOptions = ParserOptions::newFromUserAndLang( new User, |
| 38 |
$this->getServiceContainer()->getContentLanguage() ); |
| 39 |
|
| 40 |
$wanCache = new WANObjectCache( [ 'cache' => new HashBagOStuff() ] ); |
| 41 |
$parser = $this->createMock( Parser::class ); |
| 42 |
$parser->method( 'getStripList' )->willReturn( [ |
| 43 |
'gallery', 'display map' , '/foo' |
| 44 |
] ); |
| 45 |
|
| 46 |
$this->preprocessor = new Preprocessor_Hash( |
| 47 |
$parser, |
| 48 |
$wanCache, |
| 49 |
[ 'cacheThreshold' => 1000 ] |
| 50 |
); |
| 51 |
} |
| 52 |
|
| 53 |
public static function provideCases() { |
| 54 |
return [ |
| 55 |
[ "Foo", "<root>Foo</root>" ], |
| 56 |
[ "<!-- Foo -->", "<root><comment><!-- Foo --></comment></root>" ], |
| 57 |
[ "<!-- Foo --><!-- Bar -->", "<root><comment><!-- Foo --></comment><comment><!-- Bar --></comment></root>" ], |
| 58 |
[ "<!-- Foo --> <!-- Bar -->", "<root><comment><!-- Foo --></comment> <comment><!-- Bar --></comment></root>" ], |
| 59 |
[ "<!-- Foo --> \n <!-- Bar -->", "<root><comment><!-- Foo --></comment> \n <comment><!-- Bar --></comment></root>" ], |
| 60 |
[ "<!-- Foo --> \n <!-- Bar -->\n", "<root><comment><!-- Foo --></comment> \n<comment> <!-- Bar -->\n</comment></root>" ], |
| 61 |
[ "<!-- Foo --> <!-- Bar -->\n", "<root><comment><!-- Foo --></comment> <comment><!-- Bar --></comment>\n</root>" ], |
| 62 |
[ "<!-->Bar", "<root><comment><!-->Bar</comment></root>" ], |
| 63 |
[ "<!-- Comment -- comment", "<root><comment><!-- Comment -- comment</comment></root>" ], |
| 64 |
[ "== Foo ==\n <!-- Bar -->\n== Baz ==\n", "<root><h level=\"2\" i=\"1\">== Foo ==</h>\n<comment> <!-- Bar -->\n</comment><h level=\"2\" i=\"2\">== Baz ==</h>\n</root>" ], |
| 65 |
[ "<gallery/>", "<root><ext><name>gallery</name><attr></attr></ext></root>" ], |
| 66 |
[ "Foo <gallery/> Bar", "<root>Foo <ext><name>gallery</name><attr></attr></ext> Bar</root>" ], |
| 67 |
[ "<gallery></gallery>", "<root><ext><name>gallery</name><attr></attr><inner></inner><close></gallery></close></ext></root>" ], |
| 68 |
[ "<foo> <gallery></gallery>", "<root><foo> <ext><name>gallery</name><attr></attr><inner></inner><close></gallery></close></ext></root>" ], |
| 69 |
[ "<foo> <gallery><gallery></gallery>", "<root><foo> <ext><name>gallery</name><attr></attr><inner><gallery></inner><close></gallery></close></ext></root>" ], |
| 70 |
[ "<noinclude> Foo bar </noinclude>", "<root><ignore><noinclude></ignore> Foo bar <ignore></noinclude></ignore></root>" ], |
| 71 |
[ "<noinclude>\n{{Foo}}\n</noinclude>", "<root><ignore><noinclude></ignore>\n<template lineStart=\"1\"><title>Foo</title></template>\n<ignore></noinclude></ignore></root>" ], |
| 72 |
[ "<noinclude>\n{{Foo}}\n</noinclude>\n", "<root><ignore><noinclude></ignore>\n<template lineStart=\"1\"><title>Foo</title></template>\n<ignore></noinclude></ignore>\n</root>" ], |
| 73 |
[ "<gallery>foo bar", "<root><gallery>foo bar</root>" ], |
| 74 |
[ "<{{foo}}>", "<root><<template><title>foo</title></template>></root>" ], |
| 75 |
[ "<{{{foo}}}>", "<root><<tplarg><title>foo</title></tplarg>></root>" ], |
| 76 |
[ "<gallery></gallery</gallery>", "<root><ext><name>gallery</name><attr></attr><inner></gallery</inner><close></gallery></close></ext></root>" ], |
| 77 |
[ "=== Foo === ", "<root><h level=\"3\" i=\"1\">=== Foo === </h></root>" ], |
| 78 |
[ "==<!-- -->= Foo === ", "<root><h level=\"2\" i=\"1\">==<comment><!-- --></comment>= Foo === </h></root>" ], |
| 79 |
[ "=== Foo ==<!-- -->= ", "<root><h level=\"1\" i=\"1\">=== Foo ==<comment><!-- --></comment>= </h></root>" ], |
| 80 |
[ "=== Foo ===<!-- -->\n", "<root><h level=\"3\" i=\"1\">=== Foo ===<comment><!-- --></comment></h>\n</root>" ], |
| 81 |
[ "=== Foo ===<!-- --> <!-- -->\n", "<root><h level=\"3\" i=\"1\">=== Foo ===<comment><!-- --></comment> <comment><!-- --></comment></h>\n</root>" ], |
| 82 |
[ "== Foo ==\n== Bar == \n", "<root><h level=\"2\" i=\"1\">== Foo ==</h>\n<h level=\"2\" i=\"2\">== Bar == </h>\n</root>" ], |
| 83 |
[ "===========", "<root><h level=\"5\" i=\"1\">===========</h></root>" ], |
| 84 |
[ "Foo\n=\n==\n=\n", "<root>Foo\n=\n==\n=\n</root>" ], |
| 85 |
[ "{{Foo}}", "<root><template><title>Foo</title></template></root>" ], |
| 86 |
[ "\n{{Foo}}", "<root>\n<template lineStart=\"1\"><title>Foo</title></template></root>" ], |
| 87 |
[ "{{Foo|bar}}", "<root><template><title>Foo</title><part><name index=\"1\" /><value>bar</value></part></template></root>" ], |
| 88 |
[ "{{Foo|bar}}a", "<root><template><title>Foo</title><part><name index=\"1\" /><value>bar</value></part></template>a</root>" ], |
| 89 |
[ "{{Foo|bar|baz}}", "<root><template><title>Foo</title><part><name index=\"1\" /><value>bar</value></part><part><name index=\"2\" /><value>baz</value></part></template></root>" ], |
| 90 |
[ "{{Foo|1=bar}}", "<root><template><title>Foo</title><part><name>1</name>=<value>bar</value></part></template></root>" ], |
| 91 |
[ "{{Foo|=bar}}", "<root><template><title>Foo</title><part><name></name>=<value>bar</value></part></template></root>" ], |
| 92 |
[ "{{Foo|bar=baz}}", "<root><template><title>Foo</title><part><name>bar</name>=<value>baz</value></part></template></root>" ], |
| 93 |
[ "{{Foo|{{bar}}=baz}}", "<root><template><title>Foo</title><part><name><template><title>bar</title></template></name>=<value>baz</value></part></template></root>" ], |
| 94 |
[ "{{Foo|1=bar|baz}}", "<root><template><title>Foo</title><part><name>1</name>=<value>bar</value></part><part><name index=\"1\" /><value>baz</value></part></template></root>" ], |
| 95 |
[ "{{Foo|1=bar|2=baz}}", "<root><template><title>Foo</title><part><name>1</name>=<value>bar</value></part><part><name>2</name>=<value>baz</value></part></template></root>" ], |
| 96 |
[ "{{Foo|bar|foo=baz}}", "<root><template><title>Foo</title><part><name index=\"1\" /><value>bar</value></part><part><name>foo</name>=<value>baz</value></part></template></root>" ], |
| 97 |
[ "{{{1}}}", "<root><tplarg><title>1</title></tplarg></root>" ], |
| 98 |
[ "{{{1|}}}", "<root><tplarg><title>1</title><part><name index=\"1\" /><value></value></part></tplarg></root>" ], |
| 99 |
[ "{{{Foo}}}", "<root><tplarg><title>Foo</title></tplarg></root>" ], |
| 100 |
[ "{{{Foo|}}}", "<root><tplarg><title>Foo</title><part><name index=\"1\" /><value></value></part></tplarg></root>" ], |
| 101 |
[ "{{{Foo|bar|baz}}}", "<root><tplarg><title>Foo</title><part><name index=\"1\" /><value>bar</value></part><part><name index=\"2\" /><value>baz</value></part></tplarg></root>" ], |
| 102 |
[ "{<!-- -->{Foo}}", "<root>{<comment><!-- --></comment>{Foo}}</root>" ], |
| 103 |
[ "{{{{Foobar}}}}", "<root>{<tplarg><title>Foobar</title></tplarg>}</root>" ], |
| 104 |
[ "{{{ {{Foo}} }}}", "<root><tplarg><title> <template><title>Foo</title></template> </title></tplarg></root>" ], |
| 105 |
[ "{{ {{{Foo}}} }}", "<root><template><title> <tplarg><title>Foo</title></tplarg> </title></template></root>" ], |
| 106 |
[ "{{{{{Foo}}}}}", "<root><template><title><tplarg><title>Foo</title></tplarg></title></template></root>" ], |
| 107 |
[ "{{{{{Foo}} }}}", "<root><tplarg><title><template><title>Foo</title></template> </title></tplarg></root>" ], |
| 108 |
[ "{{{{{{Foo}}}}}}", "<root><tplarg><title><tplarg><title>Foo</title></tplarg></title></tplarg></root>" ], |
| 109 |
[ "{{{{{{Foo}}}}}", "<root>{<template><title><tplarg><title>Foo</title></tplarg></title></template></root>" ], |
| 110 |
[ "[[[Foo]]", "<root>[[[Foo]]</root>" ], |
| 111 |
[ "{{Foo|[[[[bar]]|baz]]}}", "<root><template><title>Foo</title><part><name index=\"1\" /><value>[[[[bar]]|baz]]</value></part></template></root>" ], |
| 112 |
[ "{{Foo|[[[[bar]|baz]]}}", "<root>{{Foo|[[[[bar]|baz]]}}</root>" ], |
| 113 |
[ "{{Foo|Foo [[[[bar]|baz]]}}", "<root>{{Foo|Foo [[[[bar]|baz]]}}</root>" ], |
| 114 |
[ "Foo <display map>Bar</display map >Baz", "<root>Foo <ext><name>display map</name><attr></attr><inner>Bar</inner><close></display map ></close></ext>Baz</root>" ], |
| 115 |
[ "Foo <display map foo>Bar</display map >Baz", "<root>Foo <ext><name>display map</name><attr> foo</attr><inner>Bar</inner><close></display map ></close></ext>Baz</root>" ], |
| 116 |
[ "Foo <gallery bar=\"baz\" />", "<root>Foo <ext><name>gallery</name><attr> bar="baz" </attr></ext></root>" ], |
| 117 |
[ "Foo <gallery bar=\"1\" baz=2 />", "<root>Foo <ext><name>gallery</name><attr> bar="1" baz=2 </attr></ext></root>" ], |
| 118 |
[ "</foo>Foo<//foo>", "<root><ext><name>/foo</name><attr></attr><inner>Foo</inner><close><//foo></close></ext></root>" ], |
| 119 |
[ "{{#ifexpr: ({{{1|1}}} = 2) | Foo | Bar }}", "<root><template><title>#ifexpr: (<tplarg><title>1</title><part><name index=\"1\" /><value>1</value></part></tplarg> = 2) </title><part><name index=\"1\" /><value> Foo </value></part><part><name index=\"2\" /><value> Bar </value></part></template></root>" ], |
| 120 |
[ "{{#if: {{{1|}}} | Foo | {{Bar}} }}", "<root><template><title>#if: <tplarg><title>1</title><part><name index=\"1\" /><value></value></part></tplarg> </title><part><name index=\"1\" /><value> Foo </value></part><part><name index=\"2\" /><value> <template><title>Bar</title></template> </value></part></template></root>" ], |
| 121 |
[ "{{#if: {{{1|}}} | Foo | [[Bar]] }}", "<root><template><title>#if: <tplarg><title>1</title><part><name index=\"1\" /><value></value></part></tplarg> </title><part><name index=\"1\" /><value> Foo </value></part><part><name index=\"2\" /><value> [[Bar]] </value></part></template></root>" ], |
| 122 |
[ "{{#if: {{{1|}}} | [[Foo]] | Bar }}", "<root><template><title>#if: <tplarg><title>1</title><part><name index=\"1\" /><value></value></part></tplarg> </title><part><name index=\"1\" /><value> [[Foo]] </value></part><part><name index=\"2\" /><value> Bar </value></part></template></root>" ], |
| 123 |
[ "{{#if: {{{1|}}} | 1 | {{#if: {{{1|}}} | 2 | 3 }} }}", "<root><template><title>#if: <tplarg><title>1</title><part><name index=\"1\" /><value></value></part></tplarg> </title><part><name index=\"1\" /><value> 1 </value></part><part><name index=\"2\" /><value> <template><title>#if: <tplarg><title>1</title><part><name index=\"1\" /><value></value></part></tplarg> </title><part><name index=\"1\" /><value> 2 </value></part><part><name index=\"2\" /><value> 3 </value></part></template> </value></part></template></root>" ], |
| 124 |
[ "{{ {{Foo}}", "<root>{{ <template><title>Foo</title></template></root>" ], |
| 125 |
[ "{{Foobar {{Foo}} {{Bar}} {{Baz}} ", "<root>{{Foobar <template><title>Foo</title></template> <template><title>Bar</title></template> <template><title>Baz</title></template> </root>" ], |
| 126 |
[ "[[Foo]] |", "<root>[[Foo]] |</root>" ], |
| 127 |
[ "{{Foo|Bar|", "<root>{{Foo|Bar|</root>" ], |
| 128 |
[ "[[Foo]", "<root>[[Foo]</root>" ], |
| 129 |
[ "[[Foo|Bar]", "<root>[[Foo|Bar]</root>" ], |
| 130 |
[ "{{Foo| [[Bar] }}", "<root>{{Foo| [[Bar] }}</root>" ], |
| 131 |
[ "{{Foo| [[Bar|Baz] }}", "<root>{{Foo| [[Bar|Baz] }}</root>" ], |
| 132 |
[ "{{Foo|bar=[[baz]}}", "<root>{{Foo|bar=[[baz]}}</root>" ], |
| 133 |
[ "{{foo|", "<root>{{foo|</root>" ], |
| 134 |
[ "{{foo|}", "<root>{{foo|}</root>" ], |
| 135 |
[ "{{foo|} }}", "<root><template><title>foo</title><part><name index=\"1\" /><value>} </value></part></template></root>" ], |
| 136 |
[ "{{foo|bar=|}", "<root>{{foo|bar=|}</root>" ], |
| 137 |
[ "{{Foo|} Bar=", "<root>{{Foo|} Bar=</root>" ], |
| 138 |
[ "{{Foo|} Bar=}}", "<root><template><title>Foo</title><part><name>} Bar</name>=<value></value></part></template></root>" ], |
| 139 |
|
| 140 |
]; |
| 141 |
|
| 142 |
} |
| 143 |
|
| 144 |
|
| 145 |
|
| 146 |
|
| 147 |
|
| 148 |
|
| 149 |
|
| 150 |
|
| 151 |
protected function preprocessToXml( $wikiText ) { |
| 152 |
$preprocessor = $this->preprocessor; |
| 153 |
if ( method_exists( $preprocessor, 'preprocessToXml' ) ) { |
| 154 |
return $this->normalizeXml( $preprocessor->preprocessToXml( $wikiText ) ); |
| 155 |
} |
| 156 |
|
| 157 |
$dom = $preprocessor->preprocessToObj( $wikiText ); |
| 158 |
if ( is_callable( [ $dom, 'saveXML' ] ) ) { |
| 159 |
return $dom->saveXML(); |
| 160 |
} else { |
| 161 |
return $this->normalizeXml( $dom->__toString() ); |
| 162 |
} |
| 163 |
} |
| 164 |
|
| 165 |
|
| 166 |
|
| 167 |
|
| 168 |
|
| 169 |
|
| 170 |
|
| 171 |
protected function normalizeXml( $xml ) { |
| 172 |
|
| 173 |
$xml = preg_replace( '!<([a-z]+)/>!', '<$1></$1>', str_replace( ' />', '/>', $xml ) ); |
| 174 |
|
| 175 |
|
| 176 |
$xml = preg_replace( '!</?equals>!', '', $xml ); |
| 177 |
return $xml; |
| 178 |
} |
| 179 |
|
| 180 |
|
| 181 |
|
| 182 |
|
| 183 |
|
| 184 |
public function testPreprocessorOutput( $wikiText, $expectedXml ) { |
| 185 |
$this->assertEquals( |
| 186 |
$this->normalizeXml( $expectedXml ), |
| 187 |
$this->preprocessToXml( $wikiText ) |
| 188 |
); |
| 189 |
} |
| 190 |
|
| 191 |
|
| 192 |
|
| 193 |
|
| 194 |
public static function provideFiles() { |
| 195 |
return [ |
| 196 |
[ "QuoteQuran" ], |
| 197 |
[ "Factorial" ], |
| 198 |
[ "All_system_messages" ], |
| 199 |
[ "Fundraising" ], |
| 200 |
[ "NestedTemplates" ], |
| 201 |
]; |
| 202 |
|
| 203 |
} |
| 204 |
|
| 205 |
|
| 206 |
|
| 207 |
|
| 208 |
public function testPreprocessorOutputFiles( $filename ) { |
| 209 |
$folder = __DIR__ . "/../../data/preprocess"; |
| 210 |
$wikiText = file_get_contents( "$folder/$filename.txt" ); |
| 211 |
$output = $this->preprocessToXml( $wikiText ); |
| 212 |
|
| 213 |
$expectedFilename = "$folder/$filename.expected"; |
| 214 |
if ( is_file( $expectedFilename ) ) { |
| 215 |
$expectedXml = $this->normalizeXml( file_get_contents( $expectedFilename ) ); |
| 216 |
$this->assertEquals( $expectedXml, $output ); |
| 217 |
} else { |
| 218 |
$tempFilename = tempnam( $folder, "$filename." ); |
| 219 |
file_put_contents( $tempFilename, $output ); |
| 220 |
$this->markTestIncomplete( "File $expectedFilename missing. Output stored as $tempFilename" ); |
| 221 |
} |
| 222 |
} |
| 223 |
|
| 224 |
|
| 225 |
2 |
| 226 |
|
| 227 |
public static function provideHeadings() { |
| 228 |
return [ |
| 229 |
|
| 230 |
[ "== h ==<!--c1-->", "<root><h level=\"2\" i=\"1\">== h ==<comment><!--c1--></comment></h></root>" ], |
| 231 |
[ "== h == <!--c1-->", "<root><h level=\"2\" i=\"1\">== h == <comment><!--c1--></comment></h></root>" ], |
| 232 |
[ "== h ==<!--c1--> ", "<root><h level=\"2\" i=\"1\">== h ==<comment><!--c1--></comment> </h></root>" ], |
| 233 |
[ "== h == <!--c1--> ", "<root><h level=\"2\" i=\"1\">== h == <comment><!--c1--></comment> </h></root>" ], |
| 234 |
[ "== h ==<!--c1--><!--c2-->", "<root><h level=\"2\" i=\"1\">== h ==<comment><!--c1--></comment><comment><!--c2--></comment></h></root>" ], |
| 235 |
[ "== h == <!--c1--><!--c2-->", "<root><h level=\"2\" i=\"1\">== h == <comment><!--c1--></comment><comment><!--c2--></comment></h></root>" ], |
| 236 |
[ "== h ==<!--c1--><!--c2--> ", "<root><h level=\"2\" i=\"1\">== h ==<comment><!--c1--></comment><comment><!--c2--></comment> </h></root>" ], |
| 237 |
[ "== h == <!--c1--><!--c2--> ", "<root><h level=\"2\" i=\"1\">== h == <comment><!--c1--></comment><comment><!--c2--></comment> </h></root>" ], |
| 238 |
[ "== h == <!--c1--> <!--c2-->", "<root><h level=\"2\" i=\"1\">== h == <comment><!--c1--></comment> <comment><!--c2--></comment></h></root>" ], |
| 239 |
[ "== h ==<!--c1--> <!--c2--> ", "<root><h level=\"2\" i=\"1\">== h ==<comment><!--c1--></comment> <comment><!--c2--></comment> </h></root>" ], |
| 240 |
[ "== h == <!--c1--> <!--c2--> ", "<root><h level=\"2\" i=\"1\">== h == <comment><!--c1--></comment> <comment><!--c2--></comment> </h></root>" ], |
| 241 |
[ "== h ==<!--c1--><!--c2--><!--c3-->", "<root><h level=\"2\" i=\"1\">== h ==<comment><!--c1--></comment><comment><!--c2--></comment><comment><!--c3--></comment></h></root>" ], |
| 242 |
[ "== h ==<!--c1--> <!--c2--><!--c3-->", "<root><h level=\"2\" i=\"1\">== h ==<comment><!--c1--></comment> <comment><!--c2--></comment><comment><!--c3--></comment></h></root>" ], |
| 243 |
[ "== h ==<!--c1--><!--c2--> <!--c3-->", "<root><h level=\"2\" i=\"1\">== h ==<comment><!--c1--></comment><comment><!--c2--></comment> <comment><!--c3--></comment></h></root>" ], |
| 244 |
[ "== h ==<!--c1--> <!--c2--> <!--c3-->", "<root><h level=\"2\" i=\"1\">== h ==<comment><!--c1--></comment> <comment><!--c2--></comment> <comment><!--c3--></comment></h></root>" ], |
| 245 |
[ "== h == <!--c1--><!--c2--><!--c3-->", "<root><h level=\"2\" i=\"1\">== h == <comment><!--c1--></comment><comment><!--c2--></comment><comment><!--c3--></comment></h></root>" ], |
| 246 |
[ "== h == <!--c1--> <!--c2--><!--c3-->", "<root><h level=\"2\" i=\"1\">== h == <comment><!--c1--></comment> <comment><!--c2--></comment><comment><!--c3--></comment></h></root>" ], |
| 247 |
[ "== h == <!--c1--><!--c2--> <!--c3-->", "<root><h level=\"2\" i=\"1\">== h == <comment><!--c1--></comment><comment><!--c2--></comment> <comment><!--c3--></comment></h></root>" ], |
| 248 |
[ "== h == <!--c1--> <!--c2--> <!--c3-->", "<root><h level=\"2\" i=\"1\">== h == <comment><!--c1--></comment> <comment><!--c2--></comment> <comment><!--c3--></comment></h></root>" ], |
| 249 |
[ "== h ==<!--c1--><!--c2--><!--c3--> ", "<root><h level=\"2\" i=\"1\">== h ==<comment><!--c1--></comment><comment><!--c2--></comment><comment><!--c3--></comment> </h></root>" ], |
| 250 |
[ "== h ==<!--c1--> <!--c2--><!--c3--> ", "<root><h level=\"2\" i=\"1\">== h ==<comment><!--c1--></comment> <comment><!--c2--></comment><comment><!--c3--></comment> </h></root>" ], |
| 251 |
[ "== h ==<!--c1--><!--c2--> <!--c3--> ", "<root><h level=\"2\" i=\"1\">== h ==<comment><!--c1--></comment><comment><!--c2--></comment> <comment><!--c3--></comment> </h></root>" ], |
| 252 |
[ "== h ==<!--c1--> <!--c2--> <!--c3--> ", "<root><h level=\"2\" i=\"1\">== h ==<comment><!--c1--></comment> <comment><!--c2--></comment> <comment><!--c3--></comment> </h></root>" ], |
| 253 |
[ "== h == <!--c1--><!--c2--><!--c3--> ", "<root><h level=\"2\" i=\"1\">== h == <comment><!--c1--></comment><comment><!--c2--></comment><comment><!--c3--></comment> </h></root>" ], |
| 254 |
[ "== h == <!--c1--> <!--c2--><!--c3--> ", "<root><h level=\"2\" i=\"1\">== h == <comment><!--c1--></comment> <comment><!--c2--></comment><comment><!--c3--></comment> </h></root>" ], |
| 255 |
[ "== h == <!--c1--><!--c2--> <!--c3--> ", "<root><h level=\"2\" i=\"1\">== h == <comment><!--c1--></comment><comment><!--c2--></comment> <comment><!--c3--></comment> </h></root>" ], |
| 256 |
[ "== h == <!--c1--> <!--c2--> <!--c3--> ", "<root><h level=\"2\" i=\"1\">== h == <comment><!--c1--></comment> <comment><!--c2--></comment> <comment><!--c3--></comment> </h></root>" ], |
| 257 |
[ "== h ==<!--c1--> <!--c2-->", "<root><h level=\"2\" i=\"1\">== h ==<comment><!--c1--></comment> <comment><!--c2--></comment></h></root>" ], |
| 258 |
[ "== h == <!--c1--> <!--c2-->", "<root><h level=\"2\" i=\"1\">== h == <comment><!--c1--></comment> <comment><!--c2--></comment></h></root>" ], |
| 259 |
[ "== h ==<!--c1--> <!--c2--> ", "<root><h level=\"2\" i=\"1\">== h ==<comment><!--c1--></comment> <comment><!--c2--></comment> </h></root>" ], |
| 260 |
|
| 261 |
|
| 262 |
[ "== h == x <!--c1--><!--c2--><!--c3--> ", "<root>== h == x <comment><!--c1--></comment><comment><!--c2--></comment><comment><!--c3--></comment> </root>" ], |
| 263 |
[ "== h ==<!--c1--> x <!--c2--><!--c3--> ", "<root>== h ==<comment><!--c1--></comment> x <comment><!--c2--></comment><comment><!--c3--></comment> </root>" ], |
| 264 |
[ "== h ==<!--c1--><!--c2--><!--c3--> x ", "<root>== h ==<comment><!--c1--></comment><comment><!--c2--></comment><comment><!--c3--></comment> x </root>" ], |
| 265 |
]; |
| 266 |
|
| 267 |
} |
| 268 |
|
| 269 |
} |