mediawiki-extensions-Discus.../tests/cases/for-parser-cache/for-parser-cache-formattedreply.html
Bartosz Dziewoński 5a07139249 CommentFormatterTest: Avoid re-serializing the HTML
The code we're testing already produces a string of serialized HTML,
no need to parse and re-serialize it.

Also, we recently learned that the precise format matters here
(T274709), and now this test *actually* covers the fix for that bug.
Follow-up to 5b26e9664b.

As a downside, this test might now spuriously fail if the format of
the output of Parsoid's XMLSerializer changes. Hopefully that won't
happen too often.

Change-Id: I69b514f545e47dcb437fb39a83edb8e2f19ed99b
2021-03-01 21:30:28 +01:00

11 lines
3.4 KiB
HTML

<span data-mw-comment-start="c|Matma Rex|2021-02-24T19:24:00.000Z"></span><span data-mw-comment="{&quot;type&quot;:&quot;heading&quot;,&quot;level&quot;:0,&quot;id&quot;:&quot;h||2021-02-24T19:24:00.000Z&quot;,&quot;replies&quot;:[&quot;c|Matma Rex|2021-02-24T19:24:00.000Z&quot;],&quot;headingLevel&quot;:99,&quot;placeholderHeading&quot;:true}"><span data-mw-comment-start="h||2021-02-24T19:24:00.000Z"></span><span data-mw-comment-end="h||2021-02-24T19:24:00.000Z"></span></span><style data-mw-deduplicate="TemplateStyles:r3303">.mw-parser-output .color-purple{color:purple}</style><div class="color-purple">This page demonstrates some quirks of raw HTML generated in ParserOutput, which gets saved to the parser cache and which we operate on in the ParserAfterTidy hook. Most other test cases are using the final HTML returned by ParserOutput::getText(), which we operate on in the OutputPageBeforeHTML hook.</div>
<p>Note:
</p>
<ul><li>No "mw-parser-output" wrapper div</li>
<li>Funky mw:editsection tags</li></ul>
<p><a href="/wiki/User:Matma_Rex" title="User:Matma Rex">Matma Rex</a> (<a href="/wiki/User_talk:Matma_Rex" title="User talk:Matma Rex"><font color="green"><i>talk</i></font></a>) 19:24, 24 February 2021 (UTC)<span class="dt-init-replylink-buttons"><span class="dt-init-replylink-bracket">[</span><a class="dt-init-replylink-reply" role="button" tabindex="0" data-mw-comment="{&quot;type&quot;:&quot;comment&quot;,&quot;level&quot;:1,&quot;id&quot;:&quot;c|Matma Rex|2021-02-24T19:24:00.000Z&quot;,&quot;replies&quot;:[],&quot;timestamp&quot;:&quot;2021-02-24T19:24:00.000Z&quot;,&quot;author&quot;:&quot;Matma Rex&quot;}">reply</a><span class="dt-init-replylink-bracket">]</span></span><span data-mw-comment-end="c|Matma Rex|2021-02-24T19:24:00.000Z"></span>
</p>
<h2><span id="Heading_with_a_.22_quote"></span><span class="mw-headline" id="Heading_with_a_&quot;_quote" data-mw-comment="{&quot;type&quot;:&quot;heading&quot;,&quot;level&quot;:0,&quot;id&quot;:&quot;h|Heading_with_a_\&quot;_quote|2021-02-24T19:24:00.000Z&quot;,&quot;replies&quot;:[&quot;c|Matma Rex|2021-02-24T19:24:00.000Z|Heading_with_a_\&quot;_quote&quot;],&quot;headingLevel&quot;:2,&quot;placeholderHeading&quot;:false}"><span data-mw-comment-start="h|Heading_with_a_&quot;_quote|2021-02-24T19:24:00.000Z"></span>Heading with a " quote<span data-mw-comment-end="h|Heading_with_a_&quot;_quote|2021-02-24T19:24:00.000Z"></span></span><mw:editsection page="Talk:For parser cache" section="1">Heading with a " quote</mw:editsection></h2>
<p><span data-mw-comment-start="c|Matma Rex|2021-02-24T19:24:00.000Z|Heading_with_a_&quot;_quote"></span>Test. <a href="/wiki/User:Matma_Rex" title="User:Matma Rex">Matma Rex</a> (<a href="/wiki/User_talk:Matma_Rex" title="User talk:Matma Rex"><font color="green"><i>talk</i></font></a>) 19:24, 24 February 2021 (UTC)<span class="dt-init-replylink-buttons"><span class="dt-init-replylink-bracket">[</span><a class="dt-init-replylink-reply" role="button" tabindex="0" data-mw-comment="{&quot;type&quot;:&quot;comment&quot;,&quot;level&quot;:1,&quot;id&quot;:&quot;c|Matma Rex|2021-02-24T19:24:00.000Z|Heading_with_a_\&quot;_quote&quot;,&quot;replies&quot;:[],&quot;timestamp&quot;:&quot;2021-02-24T19:24:00.000Z&quot;,&quot;author&quot;:&quot;Matma Rex&quot;}">reply</a><span class="dt-init-replylink-bracket">]</span></span><span data-mw-comment-end="c|Matma Rex|2021-02-24T19:24:00.000Z|Heading_with_a_&quot;_quote"></span>
</p>