Permalink
Browse files

Updated JS formatter.

Added new options: space_after_anon_function and e4x
  • Loading branch information...
1 parent 1ac7333 commit f33a3b22b57a5479eb0237dfb83563a71869b55e @akalongman committed Mar 29, 2016
Showing with 352 additions and 172 deletions.
  1. +1 −0 .gitignore
  2. +8 −0 codeformatter/jsformatter.py
  3. +342 −171 codeformatter/lib/jsbeautifier/__init__.py
  4. +1 −1 codeformatter/lib/jsbeautifier/__version__.py
View
@@ -1,2 +1,3 @@
*.pyc
/package-metadata.json
+.fuse_*
@@ -130,6 +130,14 @@ def format(self, text):
else:
options.comma_first = False
+ if ("space_after_anon_function" in self.opts and self.opts["space_after_anon_function"]):
+ options.space_after_anon_function = True
+ else:
+ options.space_after_anon_function = False
+
+
+
+
try:
stdout = jsbeautifier.beautify(text, options)
except Exception as e:
Oops, something went wrong.

0 comments on commit f33a3b2

Please sign in to comment.