X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=blobdiff_plain;ds=sidebyside;f=includes%2Fparser%2FParserOutput.php;h=8f0a1d7cc9fdee8ce6b7e25df035ca71beab29ad;hb=bd2f9e35da01c782751884366f207e6e166099fb;hp=e2efaff40f706a2b5d92f3f746d1a4368af75a69;hpb=92571d7c1a9c25604382f9c395e487e44cc442d5;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/parser/ParserOutput.php b/includes/parser/ParserOutput.php index e2efaff40f..8f0a1d7cc9 100644 --- a/includes/parser/ParserOutput.php +++ b/includes/parser/ParserOutput.php @@ -21,6 +21,7 @@ * @file * @ingroup Parser */ + class ParserOutput extends CacheTime { /** * Feature flags to indicate to extensions that MediaWiki core supports and @@ -150,12 +151,6 @@ class ParserOutput extends CacheTime { */ public $mSections = []; - /** - * @deprecated since 1.31 Use getText() options. - * @var bool $mEditSectionTokens prefix/suffix markers if edit sections were output as tokens. - */ - public $mEditSectionTokens = true; - /** * @var array $mProperties Name/value pairs to be cached in the DB. */ @@ -171,12 +166,6 @@ class ParserOutput extends CacheTime { */ public $mTimestamp; - /** - * @deprecated since 1.31 Use getText() options. - * @var bool $mTOCEnabled Whether TOC should be shown, can't override __NOTOC__. - */ - public $mTOCEnabled = true; - /** * @var bool $mEnableOOUI Whether OOUI should be enabled. */ @@ -270,26 +259,20 @@ class ParserOutput extends CacheTime { * section edit link tokens are present in the HTML. Default is true, * but might be statefully overridden. * - unwrap: (bool) Remove a wrapping mw-parser-output div. Default is false. + * - deduplicateStyles: (bool) When true, which is the default, `#s', + function ( $m ) use ( &$seen ) { + $attr = Sanitizer::decodeTagAttributes( $m[1] ); + if ( !isset( $attr['data-mw-deduplicate'] ) ) { + return $m[0]; + } + + $key = $attr['data-mw-deduplicate']; + if ( !isset( $seen[$key] ) ) { + $seen[$key] = true; + return $m[0]; + } + + // We were going to use an empty