Skip to content

Commit 9885241

Browse files
committedOct 16, 2020
[javascript mode] Don't indent in template strings
Closes #6442
1 parent 9caacec commit 9885241

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎mode/javascript/javascript.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -868,7 +868,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
868868
},
869869

870870
indent: function(state, textAfter) {
871-
if (state.tokenize == tokenComment) return CodeMirror.Pass;
871+
if (state.tokenize == tokenComment || state.tokenize == tokenQuasi) return CodeMirror.Pass;
872872
if (state.tokenize != tokenBase) return 0;
873873
var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical, top
874874
// Kludge to prevent 'maybelse' from blocking lexical scope pops

0 commit comments

Comments
 (0)
Please sign in to comment.