mediawiki-extensions-Discus.../tests/cases/formattedreply.json
Bartosz Dziewoński 5b26e9664b CommentFormatter: Fix inserting placeholder heading marker
This code expected $container->firstChild to be a
<div class="mw-parser-output">, but that element is not present
when we're running on HTML to be saved in parser cache.

We ended up inserting the marker inside whatever node was the
first on the page, and if it was a <style> element, both our
marker and the styles would be lost when serializing, like in
6c7a0ca9a2.

When we're running on final HTML, the marker will now be outside
of <div class="mw-parser-output">, but that seems to be fine. Only
early versions of I4e60fdbc098c1a74757d6e60fec6bcf8e5db37c1 had
problems with that (see comments on patchset 41), but it works now.

The added test case also covers the fix for T274709.

Bug: T275440
Change-Id: I38d45dd8686919be51e1d307ded12b0afe185eb5
2021-02-24 20:32:48 +01:00

66 lines
2.3 KiB
JSON

[
{
"name": "plwiki oldparser",
"dom": "cases/pl-big-oldparser/pl-big-oldparser.html",
"expected": "cases/pl-big-oldparser/pl-big-oldparser-formattedreply.html",
"config": "../data/plwiki-config.json",
"data": "../data/plwiki-data.json"
},
{
"name": "enwiki oldparser",
"dom": "cases/en-big-oldparser/en-big-oldparser.html",
"expected": "cases/en-big-oldparser/en-big-oldparser-formattedreply.html",
"config": "../data/enwiki-config.json",
"data": "../data/enwiki-data.json"
},
{
"name": "arwiki no-paragraph oldparser",
"dom": "cases/ar-no-paragraph-oldparser/ar-no-paragraph-oldparser.html",
"expected": "cases/ar-no-paragraph-oldparser/ar-no-paragraph-oldparser-formattedreply.html",
"config": "../data/arwiki-config.json",
"data": "../data/arwiki-data.json"
},
{
"name": "frwiki unsigned oldparser",
"dom": "cases/fr-unsigned-oldparser/fr-unsigned-oldparser.html",
"expected": "cases/fr-unsigned-oldparser/fr-unsigned-oldparser-formattedreply.html",
"config": "../data/frwiki-config.json",
"data": "../data/frwiki-data.json"
},
{
"name": "itwiki unsigned oldparser",
"dom": "cases/it-unsigned-oldparser/it-unsigned-oldparser.html",
"expected": "cases/it-unsigned-oldparser/it-unsigned-oldparser-formattedreply.html",
"config": "../data/itwiki-config.json",
"data": "../data/itwiki-data.json"
},
{
"name": "Mess caused by unclosed <font> tags in wikitext",
"dom": "cases/unclosed-font/unclosed-font.html",
"expected": "cases/unclosed-font/unclosed-font-formattedreply.html",
"config": "../data/nlwiki-config.json",
"data": "../data/nlwiki-data.json"
},
{
"name": "Reply inserted inside/outside various wrapper elements",
"dom": "cases/wrappers/wrappers.html",
"expected": "cases/wrappers/wrappers-formattedreply.html",
"config": "../data/enwiki-config.json",
"data": "../data/enwiki-data.json"
},
{
"name": "Signatures in funny places",
"dom": "cases/signatures-funny/signatures-funny.html",
"expected": "cases/signatures-funny/signatures-funny-formattedreply.html",
"config": "../data/enwiki-config.json",
"data": "../data/enwiki-data.json"
},
{
"name": "Signatures in funny places",
"dom": "cases/for-parser-cache/for-parser-cache.html",
"expected": "cases/for-parser-cache/for-parser-cache-formattedreply.html",
"config": "../data/enwiki-config.json",
"data": "../data/enwiki-data.json"
}
]