mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/TextExtracts
synced 2024-11-15 03:35:20 +00:00
Better way to detect if Tidy is on
Change-Id: Ie9723ef50d9a472605da92faabced3d852ec9387
This commit is contained in:
parent
1bdb8410ac
commit
b9a21cc865
|
@ -353,9 +353,7 @@ class ApiQueryExtracts extends ApiQueryBase {
|
|||
* @return string
|
||||
*/
|
||||
private function tidy( $text ) {
|
||||
$tidyConfig = $this->getConfig()->get( 'TidyConfig' );
|
||||
|
||||
if ( $tidyConfig !== null && !$this->params['plaintext'] ) {
|
||||
if ( MWTidy::isEnabled() && !$this->params['plaintext'] ) {
|
||||
$text = trim( MWTidy::tidy( $text ) );
|
||||
}
|
||||
return $text;
|
||||
|
|
Loading…
Reference in a new issue