From 30ada34bd060b271893559f1317576d9fa7fbade Mon Sep 17 00:00:00 2001 From: Jose Agustin Villalobos Date: Fri, 30 Dec 2016 15:10:12 -0400 Subject: [PATCH] Fix JS beautify on JSX and EJS --- src/beautifiers/js-beautify.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/beautifiers/js-beautify.coffee b/src/beautifiers/js-beautify.coffee index ab8d733..7092e23 100644 --- a/src/beautifiers/js-beautify.coffee +++ b/src/beautifiers/js-beautify.coffee @@ -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}")