Go to file
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
.phan build: Add mediawiki/mediawiki-phan-config 2020-06-10 22:21:07 +02:00
i18n Localisation updates from https://translatewiki.net. 2021-02-22 08:51:43 +01:00
images Add beta feature preference 2020-02-21 15:20:48 +00:00
includes CommentFormatter: Fix inserting placeholder heading marker 2021-02-24 20:32:48 +01:00
maintenance Defensive use of dynamic paths in maintenance script 2020-02-20 19:51:07 +01:00
modules Merge "Show wikitext warnings for sequences not in reply tools" 2021-02-19 00:27:12 +00:00
tests CommentFormatter: Fix inserting placeholder heading marker 2021-02-24 20:32:48 +01:00
.eslintrc.json build: Update devDependencies 2020-06-09 19:42:05 +01:00
.gitignore Remove extra blank line from .gitignore file 2020-08-31 15:24:56 +01:00
.gitreview Add .gitreview 2019-10-09 21:18:34 +00:00
.phpcs.xml build: Updating mediawiki/mediawiki-codesniffer to 32.0.0 2020-10-29 10:53:01 +00:00
.stylelintrc.json Stylelint: Enforce class prefixes 2020-12-23 16:47:55 +00:00
CODE_OF_CONDUCT.md build: Updating npm dependencies 2020-01-09 06:43:15 +00:00
composer.json build: Updating dependencies 2021-01-29 09:54:58 +00:00
COPYING Add required files for an extension 2019-10-10 19:42:56 +01:00
extension.json Make CommentUtilsTest a proper unit test 2021-02-02 15:37:17 +01:00
Gruntfile.js build: Update devDependencies 2020-06-09 19:42:05 +01:00
package-lock.json build: Updating dependencies 2021-01-29 09:54:58 +00:00
package.json build: Updating dependencies 2021-01-29 09:54:58 +00:00