• Download Gist
small fix for jsbeautify vim plugin
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
--- jsbeautify.vim 2010-07-27 10:25:28.441826998 +0200
+++ jsbeautify.vim 2010-07-27 11:34:23.800437922 +0200
@@ -120,14 +120,14 @@
endwhile
endif
- "if s:parser_pos != len(s:input) && c =~ /^[0-9]+[Ee]$/ && (s:input[s:parser_pos] == "-" || s:input[s:parser_pos] == "+")
- "let sign = s:input[s:parser_pos]
- "let s:parser_pos += 1
-
- "let t = get_next_token(s:parser_pos)
- "let c .= sign . t[0]
- "return [c, "TK_WORD"]
- " endif
+ if s:parser_pos != len(s:input) && c =~ '^[0-9]\+[Ee]$' && (s:input[s:parser_pos] == "-" || s:input[s:parser_pos] == "+")
+ let sign = s:input[s:parser_pos]
+ let s:parser_pos += 1
+
+ let t = s:get_next_token()
+ let c .= sign . t[0]
+ return [c, "TK_WORD"]
+ endif
if c == "in"
return [c, "TK_OPERATOR"]

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.