mirror of
https://github.com/Universal-Omega/PortableInfobox.git
synced 2024-11-27 17:50:38 +00:00
Force RemexHtml as Tidy driver and add an option to disable tidying
This commit is contained in:
parent
e51204ff8b
commit
8a93653f0b
|
@ -12,7 +12,8 @@
|
|||
"config": {
|
||||
"AllInfoboxesMiserMode": true,
|
||||
"AllInfoboxesSubpagesBlacklist": [ "doc", "draft", "test" ],
|
||||
"PortableInfoboxCustomImageWidth": 300
|
||||
"PortableInfoboxCustomImageWidth": 300,
|
||||
"PortableInfoboxUseTidy": true
|
||||
},
|
||||
"MessagesDirs": {
|
||||
"PortableInfobox": "i18n"
|
||||
|
|
|
@ -9,13 +9,16 @@ class MediaWikiParserService implements ExternalParser {
|
|||
protected $tidyDriver;
|
||||
|
||||
public function __construct( \Parser $parser, \PPFrame $frame ) {
|
||||
global $wgTidyConfig;
|
||||
global $wgPortableInfoboxUseTidy;
|
||||
|
||||
$this->parser = $parser;
|
||||
$this->frame = $frame;
|
||||
|
||||
if ( $wgTidyConfig !== null ) {
|
||||
$this->tidyDriver = \MWTidy::factory( array_merge( $wgTidyConfig, [ 'pwrap' => false ] ) );
|
||||
if ( $wgPortableInfoboxUseTidy ) {
|
||||
$this->tidyDriver = \MWTidy::factory( [
|
||||
'driver' => 'RemexHtml',
|
||||
'pwrap' => false
|
||||
] );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue