dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tests: Commit initial version of DevelopmentSettings.php
[lhc/web/wiklou.git]
/
maintenance
/
parse.php
diff --git
a/maintenance/parse.php
b/maintenance/parse.php
index
17a8d2e
..
6279a34
100644
(file)
--- a/
maintenance/parse.php
+++ b/
maintenance/parse.php
@@
-68,6
+68,7
@@
class CLIParser extends Maintenance {
false,
true
);
false,
true
);
+ $this->addOption( 'tidy', 'Tidy the output' );
$this->addArg( 'file', 'File containing wikitext (Default: stdin)', false );
}
$this->addArg( 'file', 'File containing wikitext (Default: stdin)', false );
}
@@
-127,10
+128,14
@@
class CLIParser extends Maintenance {
* @return ParserOutput
*/
protected function parse( $wikitext ) {
* @return ParserOutput
*/
protected function parse( $wikitext ) {
+ $options = new ParserOptions;
+ if ( $this->getOption( 'tidy' ) ) {
+ $options->setTidy( true );
+ }
return $this->parser->parse(
$wikitext,
$this->getTitle(),
return $this->parser->parse(
$wikitext,
$this->getTitle(),
- new ParserOptions()
+ $options
);
}
}
);
}
}