Skip to content

Commit

Permalink
Add -newlineBetweenRules argument
Browse files Browse the repository at this point in the history
(and override default value to false)
  • Loading branch information
Infocatcher committed Dec 9, 2014
1 parent 1b4ee88 commit 7e16d14
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions jsBeautifier.js
Expand Up @@ -39,6 +39,7 @@
// -wrapLineLength=70 - lines should wrap at next opportunity after this number of characters
// -e4x=true - handle E4X XML literals
// -endWithNewline=false - end output with a newline
// -newlineBetweenRules=true - add extra newline between CSS rules (only for HTML)
// -maxChar=70 - maximum amount of characters per line (only for HTML), deprecated, use -wrapLineLength instead
// -unformattedTags=["a"] - list of tags, that shouldn't be reformatted (only for HTML)
// -indentInnerHTML=true - indent <head> and <body> sections (only for HTML)
Expand Down Expand Up @@ -115,6 +116,7 @@ var unescapeStrings = getArg("unescapeStrings"); // Will use jsBeautifier
var wrapLineLength = getArg("wrapLineLength");
var e4x = getArg("e4x");
var endWithNewline = getArg("endWithNewline");
var newlineBetweenRules = getArg("newlineBetweenRules", false);
var maxChar = getArg("maxChar"); // Will use jsBeautifier defaults
var unformattedTags = getArg("unformattedTags"); // Will use jsBeautifier defaults
var indentInnerHTML = getArg("indentInnerHTML"); // Will use jsBeautifier defaults
Expand Down Expand Up @@ -179,6 +181,7 @@ function beautify(source, syntax) { // Based on beautify function
wrap_line_length: wrapLineLength,
e4x: e4x,
end_with_newline: endWithNewline,
newline_between_rules: newlineBetweenRules,
// for style_html():
max_char: maxChar,
unformatted: unformattedTags,
Expand Down

0 comments on commit 7e16d14

Please sign in to comment.