Fixes #245, fixes #180. Add Preserve new lines support for LESS/SCSS

This commit is contained in:
Glavin Wiechert 2015-03-20 14:06:02 -03:00
parent 347dc81fc6
commit c84f7656aa
3 changed files with 11 additions and 2 deletions

View File

@ -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]

View File

@ -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:

View File

@ -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",