Better way to detect if Tidy is on

Change-Id: Ie9723ef50d9a472605da92faabced3d852ec9387
This commit is contained in:
Max Semenik 2019-03-17 18:19:34 -07:00
parent 1bdb8410ac
commit b9a21cc865

View file

@ -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;