mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-12 01:16:19 +00:00
Merge "ParserOutputPostCacheTransform: Don't reprocess content"
This commit is contained in:
commit
4f5a91ba52
|
@ -86,6 +86,12 @@ class ParserHooks implements
|
|||
* @inheritDoc
|
||||
*/
|
||||
public function onParserOutputPostCacheTransform( $parserOutput, &$text, &$options ): void {
|
||||
if ( $parserOutput->getExtensionData( 'DiscussionTools-tocInfo' ) !== null ) {
|
||||
// Since getText() could be called multiple times, return if we have
|
||||
// already processed this ParserOutput object
|
||||
return;
|
||||
}
|
||||
|
||||
// NOTE: This is a temporary proxy for 'isPreview' flag in ParserOptions.
|
||||
// It is not clear whether 'editsectionEditLinks' is disabled only for previews.
|
||||
$isPreview = empty( $options['enableSectionEditLinks'] );
|
||||
|
|
Loading…
Reference in a new issue