Fix JS beautify on JSX and EJS

This commit is contained in:
Jose Agustin Villalobos 2016-12-30 15:10:12 -04:00 committed by GitHub
parent 41af3060e6
commit 30ada34bd0
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}")