Merge pull request #1432 from NodeJoSe/patch-4

Fix JS beautify on JSX and EJS
This commit is contained in:
Glavin Wiechert 2016-12-31 22:47:10 -04:00 committed by GitHub
commit c3e554d9c4
1 changed files with 2 additions and 2 deletions

View File

@ -33,7 +33,7 @@ module.exports = class JSBeautify extends Beautifier
return new @Promise((resolve, reject) =>
try
switch language
when "JSON", "JavaScript"
when "JSON", "JavaScript", "JSX"
beautifyJS = require("js-beautify")
text = beautifyJS(text, options)
resolve text
@ -44,7 +44,7 @@ module.exports = class JSBeautify extends Beautifier
beautifyHTML = require("js-beautify").html
text = beautifyHTML(text, options)
resolve text
when "HTML (Liquid)", "HTML", "XML", "Web Form/Control (C#)", "Web Handler (C#)"
when "EJS", "HTML (Liquid)", "HTML", "XML", "Web Form/Control (C#)", "Web Handler (C#)"
beautifyHTML = require("js-beautify").html
text = beautifyHTML(text, options)
@debug("Beautified HTML: #{text}")