dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
dc35b44
)
Add --tidy option to maintenance/parse.php
author
Subramanya Sastry
<ssastry@wikimedia.org>
Sun, 12 Mar 2017 22:13:51 +0000
(17:13 -0500)
committer
Tim Starling
<tstarling@wikimedia.org>
Tue, 14 Mar 2017 22:49:02 +0000
(09:49 +1100)
Change-Id: I6ec08237bd15ee2d824164a0493b7fff9ef312db
maintenance/parse.php
patch
|
blob
|
history
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
);
+ $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
);
}
}