Skip to content

Commit

Permalink
[julia mode] Make sure dedent tokens end in a word boundary
Browse files Browse the repository at this point in the history
Closes #6376
  • Loading branch information
marijnh committed Aug 8, 2020
1 parent 26b739f commit def6f5b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mode/julia/julia.js
Original file line number Diff line number Diff line change
Expand Up @@ -401,8 +401,8 @@ CodeMirror.defineMode("julia", function(config, parserConf) {

indent: function(state, textAfter) {
var delta = 0;
if ( textAfter === ']' || textAfter === ')' || /^end/.test(textAfter) ||
/^else/.test(textAfter) || /^catch/.test(textAfter) || /^elseif/.test(textAfter) ||
if ( textAfter === ']' || textAfter === ')' || /^end\b/.test(textAfter) ||
/^else/.test(textAfter) || /^catch\b/.test(textAfter) || /^elseif\b/.test(textAfter) ||
/^finally/.test(textAfter) ) {
delta = -1;
}
Expand Down

0 comments on commit def6f5b

Please sign in to comment.