Skip to content

Commit

Permalink
Fixes #245, fixes #180. Add Preserve new lines support for LESS/SCSS
Browse files Browse the repository at this point in the history
  • Loading branch information
Glavin001 committed Mar 20, 2015
1 parent 347dc81 commit c84f765
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/langs/css-prettydiff-beautify.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ module.exports = (text, options, callback) ->
mode: "beautify"
inchar: options.indent_character
insize: options.indent_size
alphasort: options.alphasort || false
alphasort: options.alphasort or false
preserve: (if (options.preserve_newlines is true ) then \
"all" else "none")

output = prettydiff.api(args)
result = output[0]
Expand Down
7 changes: 7 additions & 0 deletions lib/language-options.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,13 @@ module.exports =
type: 'boolean'
default: false
description: "Add a newline between CSS rules"
css_preserve_newlines:
type: 'boolean'
default: false
description: "(Only LESS/SASS/SCSS with Prettydiff) "+
"Retain empty lines. "+
"Consecutive empty lines will be converted to a single empty line."


# HTML
html_htmlbeautifier_path:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"loophole": "^1.0.0",
"node-dir": "^0.1.6",
"node-uuid": "^1.4.1",
"prettydiff": "^1.11.0",
"prettydiff": "^1.11.2",
"space-pen": "^4.3.0",
"strip-json-comments": "^0.1.3",
"temp": "^0.8.0",
Expand Down

0 comments on commit c84f765

Please sign in to comment.