Skip to content

Commit

Permalink
Merge pull request #1432 from NodeJoSe/patch-4
Browse files Browse the repository at this point in the history
Fix JS beautify on JSX and EJS
  • Loading branch information
Glavin001 authored Jan 1, 2017
2 parents 41af306 + 30ada34 commit c3e554d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/beautifiers/js-beautify.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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}")
Expand Down

0 comments on commit c3e554d

Please sign in to comment.