Skip to content

Commit 3e5b5e9

Browse files
committed
[javascript mode] Fix bad context tracking for brackets at end of line
Closes #6853
1 parent 0d48b56 commit 3e5b5e9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

mode/javascript/javascript.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
330330
cx.state.context = new Context(cx.state.context, cx.state.localVars, true)
331331
cx.state.localVars = null
332332
}
333+
pushcontext.lex = pushblockcontext.lex = true
333334
function popcontext() {
334335
cx.state.localVars = cx.state.context.vars
335336
cx.state.context = cx.state.context.prev

0 commit comments

Comments
 (0)