mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-24 00:13:36 +00:00
Suppress the empty state in previews again
It wasn't appearing in normal previews thanks to some redundant checks elsewhere, but it was appearing in our own internal previews using ApiDiscussionToolsTrait::previewMessage(). It wasn't causing any problems until change Iac3778a4a88a4def234be9d10b80d9796d35bceb, which detects headings in the preview, and it was detecting the empty state heading. Follow-up to commits8fb467896f
andab40ef62c0
, where I replaced a HTML comment with ParserOutput extension data to indicate this, and then accidentally removed the cleanup code from removeInteractiveTools() with no replacement. Change-Id: I4b650f82c711d65e200758e981ce338202deeaa6
This commit is contained in:
parent
28fdcfc132
commit
aa239a1ad1
|
@ -69,6 +69,8 @@ class ParserHooks implements
|
|||
|
||||
if ( $parser->getOptions()->getIsPreview() ) {
|
||||
$text = CommentFormatter::removeInteractiveTools( $text );
|
||||
// Suppress the empty state
|
||||
$pout->setExtensionData( 'DiscussionTools-isEmptyTalkPage', null );
|
||||
}
|
||||
|
||||
$pout->addModuleStyles( [
|
||||
|
|
Loading…
Reference in a new issue