Skip to content

Commit

Permalink
Make the Scala mode recognize character literals
Browse files Browse the repository at this point in the history
FIX: Fix tokenizing of character literals in the Scala mode.

Closes codemirror/dev#1112
  • Loading branch information
marijnh committed Mar 16, 2023
1 parent 1cf478b commit 7e3ace4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mode/clike.js
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,7 @@ export const scala = clike({
return state.tokenize(stream, state);
},
"'": function(stream) {
if (stream.match(/^(\\[^'\s]+|[^\\'])'/)) return "character"
stream.eatWhile(/[\w\$_\xa1-\uffff]/);
return "atom";
},
Expand Down

0 comments on commit 7e3ace4

Please sign in to comment.