Skip to content

Commit abfa457

Browse files
committed
[julia mode] Fix failure to advance on mismatched closing brace
Closes codemirror#5797
1 parent 278503b commit abfa457

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

mode/julia/julia.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ CodeMirror.defineMode("julia", function(config, parserConf) {
302302
stream.match(/.*?(?=,|;|{|}|\(|\)|=|$|\s)/);
303303
if (stream.match(/^{/)) {
304304
state.nestedParameters++;
305-
} else if (stream.match(/^}/)) {
305+
} else if (stream.match(/^}/) && state.nestedParameters > 0) {
306306
state.nestedParameters--;
307307
}
308308
if (state.nestedParameters > 0) {

0 commit comments

Comments
 (0)