mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
add proper spacing to optparse by default
This commit is contained in:
parent
44398d044f
commit
965034e16e
4 changed files with 4 additions and 4 deletions
|
@ -46,7 +46,7 @@
|
|||
};
|
||||
// The "--help" usage message.
|
||||
usage = function usage() {
|
||||
puts('\n' + option_parser.help() + '\n');
|
||||
puts(option_parser.help());
|
||||
return process.exit(0);
|
||||
};
|
||||
// The "--version" message.
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
let_part = rule.letter ? rule.letter + ', ' : ' ';
|
||||
lines.push(' ' + let_part + rule.flag + spaces + rule.description);
|
||||
}
|
||||
return lines.join('\n');
|
||||
return '\n' + lines.join('\n') + '\n';
|
||||
};
|
||||
return OptionParser;
|
||||
}).call(this);
|
||||
|
|
|
@ -51,7 +51,7 @@ exports.run: ->
|
|||
|
||||
# The "--help" usage message.
|
||||
usage: ->
|
||||
puts '\n' + option_parser.help() + '\n'
|
||||
puts option_parser.help()
|
||||
process.exit 0
|
||||
|
||||
# The "--version" message.
|
||||
|
|
|
@ -34,7 +34,7 @@ exports.OptionParser: class OptionParser
|
|||
spaces: if spaces > 0 then (' ' for i in [0..spaces]).join('') else ''
|
||||
let_part: if rule.letter then rule.letter + ', ' else ' '
|
||||
lines.push ' ' + let_part + rule.flag + spaces + rule.description
|
||||
lines.join('\n')
|
||||
'\n' + lines.join('\n') + '\n'
|
||||
|
||||
# Regex matchers for option flags.
|
||||
LONG_FLAG: /^(--\w[\w\-]+)/
|
||||
|
|
Loading…
Add table
Reference in a new issue