Skip to content

Commit 58acfdd

Browse files
jasongroutmarijnh
authored andcommitted
[scala mode] Do not autoclose single quotes
A single quote in scala indicates the start of a symbol literal (like 'x), not a string, so should not be paired with a closing single quote. See https://www.scala-lang.org/files/archive/spec/2.12/01-lexical-syntax.html#string-literals and https://www.scala-lang.org/files/archive/spec/2.12/01-lexical-syntax.html#symbol-literals for more information.
1 parent c6a935c commit 58acfdd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mode/clike/clike.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ CodeMirror.defineMode("clike", function(config, parserConfig) {
573573
return state.tokenize(stream, state)
574574
}
575575
},
576-
modeProps: {closeBrackets: {triples: '"'}}
576+
modeProps: {closeBrackets: {pairs: '()[]{}""', triples: '"'}}
577577
});
578578

579579
function tokenKotlinString(tripleString){

0 commit comments

Comments
 (0)