X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;ds=sidebyside;f=maintenance%2Fparse.php;h=6279a348ac7de78b17905a3fa5db55325f9be4c7;hb=41690888a2919b3fb89c715c364d21d8965c8b26;hp=17a8d2ebf4f0ba58aaf2e6f6ed4b0aaede2ed653;hpb=21463af0d8db7d7ea8e0e87e48e75cd3acb832b7;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/parse.php b/maintenance/parse.php index 17a8d2ebf4..6279a348ac 100644 --- a/maintenance/parse.php +++ b/maintenance/parse.php @@ -68,6 +68,7 @@ class CLIParser extends Maintenance { false, true ); + $this->addOption( 'tidy', 'Tidy the output' ); $this->addArg( 'file', 'File containing wikitext (Default: stdin)', false ); } @@ -127,10 +128,14 @@ class CLIParser extends Maintenance { * @return ParserOutput */ protected function parse( $wikitext ) { + $options = new ParserOptions; + if ( $this->getOption( 'tidy' ) ) { + $options->setTidy( true ); + } return $this->parser->parse( $wikitext, $this->getTitle(), - new ParserOptions() + $options ); } }