X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fcontent%2FWikiTextStructure.php;h=1128d7bd36ed06f5a2e3411d5650cfb998152a5d;hb=d503ac7c9433a36358b1db27c6365167ea869832;hp=aeb96b6531d5485633622b775d3204ac0d0e3b62;hpb=d19826aa35b206847a568a4b2c1c9ffaa615fca5;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/content/WikiTextStructure.php b/includes/content/WikiTextStructure.php index aeb96b6531..1128d7bd36 100644 --- a/includes/content/WikiTextStructure.php +++ b/includes/content/WikiTextStructure.php @@ -29,6 +29,8 @@ class WikiTextStructure { private $excludedElementSelectors = [ // "it looks like you don't have javascript enabled..." – do not need to index 'audio', 'video', + // CSS stylesheets aren't content + 'style', // The [1] for references 'sup.reference', // The ↑ next to references in the references section @@ -146,9 +148,10 @@ class WikiTextStructure { if ( !is_null( $this->allText ) ) { return; } - $this->parserOutput->setEditSectionTokens( false ); - $this->parserOutput->setTOCEnabled( false ); - $text = $this->parserOutput->getText(); + $text = $this->parserOutput->getText( [ + 'enableSectionEditTokens' => false, + 'allowTOC' => false, + ] ); if ( strlen( $text ) == 0 ) { $this->allText = ""; // empty text - nothing to seek here