X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FcompareParsers.php;h=f2540c7afa5609f2d5f3d802860889b866698b79;hb=7f505be05b21cf829eaebaea227ab46d4c6a02f4;hp=3929a5b4574a0af460ea526808d04be5825648ae;hpb=752c7081495438e7199d966c3a8757a11489e16e;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/compareParsers.php b/maintenance/compareParsers.php index 3929a5b457..f2540c7afa 100644 --- a/maintenance/compareParsers.php +++ b/maintenance/compareParsers.php @@ -43,7 +43,7 @@ class CompareParsers extends DumpIterator { public function __construct() { parent::__construct(); $this->saveFailed = false; - $this->mDescription = "Run a file or dump with several parsers"; + $this->addDescription( 'Run a file or dump with several parsers' ); $this->addOption( 'parser1', 'The first parser to compare.', true, true ); $this->addOption( 'parser2', 'The second parser to compare.', true, true ); $this->addOption( 'tidy', 'Run tidy on the articles.', false, false ); @@ -116,6 +116,7 @@ class CompareParsers extends DumpIterator { if ( !$this->stripParametersEnabled ) { return $text; } + return preg_replace( '/(]+>/', '$1>', $text ); } @@ -179,10 +180,9 @@ class CompareParsers extends DumpIterator { /* Look for the parser in a file appropiately named in the current folder */ if ( !class_exists( $parserName ) && file_exists( "$parserName.php" ) ) { global $wgAutoloadClasses; - $wgAutoloadClasses[ $parserName ] = realpath( '.' ) . "/$parserName.php"; + $wgAutoloadClasses[$parserName] = realpath( '.' ) . "/$parserName.php"; } } - } $maintClass = "CompareParsers";