diff options
author | Bartosz Dziewoński <dziewonski@fastmail.fm> | 2024-03-07 21:24:00 +0100 |
---|---|---|
committer | Bartosz Dziewoński <dziewonski@fastmail.fm> | 2024-03-08 00:24:43 +0100 |
commit | 45875d1849d7957dd2d33d511c848ae976f764f5 (patch) | |
tree | 37c1b78ae1bef3d6451c39109cc351ac127103ea /includes/content | |
parent | 0d99a1c4459a72d189e119a38a24578b37848fdc (diff) | |
download | mediawikicore-45875d1849d7957dd2d33d511c848ae976f764f5.tar.gz mediawikicore-45875d1849d7957dd2d33d511c848ae976f764f5.zip |
WikiTextStructure: Use raw text from ParserOutput
It should be good enough for search indexing, and it avoids a
dependency on ParserOutput, Skin, OutputTransforms, and lots of other
slow and scary code.
getText() is deprecated, and we were trying to use a non-existent
option 'enableSectionEditTokens', so fixing that is nice as well.
Change-Id: Iac6b850af883ded414bdc26e954b0c0949af3b58
Diffstat (limited to 'includes/content')
-rw-r--r-- | includes/content/WikiTextStructure.php | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/includes/content/WikiTextStructure.php b/includes/content/WikiTextStructure.php index 26c6f07d6b4b..697c13bc6e6e 100644 --- a/includes/content/WikiTextStructure.php +++ b/includes/content/WikiTextStructure.php @@ -153,10 +153,7 @@ class WikiTextStructure { if ( $this->allText !== null ) { return; } - $text = $this->parserOutput->getText( [ - 'enableSectionEditTokens' => false, - 'allowTOC' => false, - ] ); + $text = $this->parserOutput->getRawText(); if ( $text === '' ) { $this->allText = ""; // empty text - nothing to seek here |