Skip to content

Commit

Permalink
[julia mode] Fix failure to advance on mismatched closing brace
Browse files Browse the repository at this point in the history
Closes #5797
  • Loading branch information
marijnh committed Mar 6, 2019
1 parent 278503b commit abfa457
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mode/julia/julia.js
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ CodeMirror.defineMode("julia", function(config, parserConf) {
stream.match(/.*?(?=,|;|{|}|\(|\)|=|$|\s)/);
if (stream.match(/^{/)) {
state.nestedParameters++;
} else if (stream.match(/^}/)) {
} else if (stream.match(/^}/) && state.nestedParameters > 0) {
state.nestedParameters--;
}
if (state.nestedParameters > 0) {
Expand Down

0 comments on commit abfa457

Please sign in to comment.