2014-08-10 15:51:44 -06:00
|
|
|
"use strict"
|
|
|
|
prettydiff = require("prettydiff")
|
|
|
|
module.exports = (text, options, callback) ->
|
|
|
|
args =
|
|
|
|
source: text
|
|
|
|
lang: "css"
|
|
|
|
mode: "beautify"
|
|
|
|
inchar: options.indent_character
|
|
|
|
insize: options.indent_size
|
2015-03-20 11:06:02 -06:00
|
|
|
alphasort: options.alphasort or false
|
|
|
|
preserve: (if (options.preserve_newlines is true ) then \
|
|
|
|
"all" else "none")
|
2014-08-10 15:51:44 -06:00
|
|
|
|
|
|
|
output = prettydiff.api(args)
|
|
|
|
result = output[0]
|
|
|
|
callback result
|
|
|
|
result
|