See #1432. Improves JS-Beautify beautifier so it will throw error when missing language
See #1458, #1471, #1483, #136, #1452
This commit is contained in:
parent
d091570860
commit
46d49750e4
|
@ -53,6 +53,8 @@ module.exports = class JSBeautify extends Beautifier
|
||||||
beautifyCSS = require("js-beautify").css
|
beautifyCSS = require("js-beautify").css
|
||||||
text = beautifyCSS(text, options)
|
text = beautifyCSS(text, options)
|
||||||
resolve text
|
resolve text
|
||||||
|
else
|
||||||
|
reject(new Error("Unknown language for JS Beautify: "+language))
|
||||||
catch err
|
catch err
|
||||||
@error("JS Beautify error: #{err}")
|
@error("JS Beautify error: #{err}")
|
||||||
reject(err)
|
reject(err)
|
||||||
|
|
Loading…
Reference in New Issue