diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-11-15 12:21:50 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-11-15 12:21:50 -0800 |
commit | 052317d315c17376d99681545ae663821aa732d4 (patch) | |
tree | a80266a94f6fb86927521d2c06e6a94e0dd0020d /src/intertyper.js | |
parent | 805e206704517118e55fb3a0097971876a43d759 (diff) |
optimize token closing brace check
Diffstat (limited to 'src/intertyper.js')
-rw-r--r-- | src/intertyper.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/intertyper.js b/src/intertyper.js index f7811444..b1bd2ba8 100644 --- a/src/intertyper.js +++ b/src/intertyper.js @@ -182,7 +182,7 @@ function intertyper(data, sidePass, baseLineNums) { // merge certain tokens if (lastToken && isType(lastToken.text) && isFunctionDef(token)) { lastToken.text += ' ' + text; - } else if (lastToken && /^}\**$/.test(text)) { // }, }*, etc. + } else if (lastToken && text[0] == '}') { // }, }*, etc. var openBrace = tokens.length-1; while (tokens[openBrace].text.substr(-1) != '{') openBrace --; token = combineTokens(tokens.slice(openBrace+1)); |