mirror of
https://github.com/Universal-Omega/PortableInfobox.git
synced 2024-11-15 03:35:53 +00:00
support MediaWikiServices::getInstance()->getTidy() on MW 1.36+
This commit is contained in:
parent
98b0038c92
commit
e02ed1ed13
|
@ -16,12 +16,16 @@ class MediaWikiParserService implements ExternalParser {
|
|||
$this->frame = $frame;
|
||||
|
||||
if ( $wgPortableInfoboxUseTidy && class_exists( '\MediaWiki\Tidy\RemexDriver' ) ) {
|
||||
if ( version_compare( MW_VERSION, '1.36', '>=' ) ) {
|
||||
$this->tidyDriver = MediaWiki\MediaWikiServices::getInstance()->getTidy();
|
||||
} else {
|
||||
$this->tidyDriver = \MWTidy::factory( [
|
||||
'driver' => 'RemexHtml',
|
||||
'pwrap' => false
|
||||
] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Method used for parsing wikitext provided in infobox that might contain variables
|
||||
|
|
Loading…
Reference in a new issue