X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fparser%2FParserOutput.php;h=8f0a1d7cc9fdee8ce6b7e25df035ca71beab29ad;hb=125a4350e89494acb1e223166b8be05efa8b98b5;hp=e2efaff40f706a2b5d92f3f746d1a4368af75a69;hpb=a9f438227050c1fac6efe91fa8ff38947ae7c089;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