Skip to content

Commit

Permalink
JS: reduce state complexity / memory footprint.
Browse files Browse the repository at this point in the history
  • Loading branch information
eustas authored and marijnh committed Feb 27, 2012
1 parent 77d0472 commit 04ba2db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mode/javascript/javascript.js
Expand Up @@ -334,7 +334,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
if (stream.eatSpace()) return null;
var style = state.tokenize(stream, state);
if (type == "comment") return style;
state.reAllowed = type == "operator" || type == "keyword c" || type.match(/^[\[{}\(,;:]$/);
state.reAllowed = !!(type == "operator" || type == "keyword c" || type.match(/^[\[{}\(,;:]$/));
state.kwAllowed = type != '.';
return parseJS(state, style, type, content, stream);
},
Expand Down

0 comments on commit 04ba2db

Please sign in to comment.