mirror of
https://github.com/beautifier/js-beautify.git
synced 2024-11-27 22:50:26 +00:00
-p for jslint-pedantic mode
Currently only switches "function ()" (-p) and "function()" (default) behaviour.
This commit is contained in:
parent
37fc405b1a
commit
acceed54b2
@ -26,6 +26,7 @@ function print_usage() {
|
||||
print("Options:");
|
||||
print("-i NUM\tIndent size (1 for TAB)");
|
||||
print("-n\tPreserve newlines");
|
||||
print("-p\tJSLint-pedantic mode, currently only adds space between \"function ()\"");
|
||||
print("-h\tPrint this help\n");
|
||||
print("Examples:");
|
||||
print("beautify-cl.js -i 2 example.js");
|
||||
@ -42,6 +43,9 @@ function parse_opts(args) {
|
||||
case "-i":
|
||||
options.indent = args.shift();
|
||||
break;
|
||||
case "-p":
|
||||
options.space_after_anon_function = true;
|
||||
break;
|
||||
case "-n":
|
||||
options.preserve_newlines = true;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user