Fix JS beautify on JSX and EJS
This commit is contained in:
parent
41af3060e6
commit
30ada34bd0
|
@ -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}")
|
||||
|
|
Loading…
Reference in New Issue