From 9885241fe9dee2415f988d3a3619421f45ce8c6b Mon Sep 17 00:00:00 2001 From: Marijn Haverbeke Date: Fri, 16 Oct 2020 09:53:55 +0200 Subject: [PATCH] [javascript mode] Don't indent in template strings Closes #6442 --- mode/javascript/javascript.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mode/javascript/javascript.js b/mode/javascript/javascript.js index 3139fd00d2..63eaa241b7 100644 --- a/mode/javascript/javascript.js +++ b/mode/javascript/javascript.js @@ -868,7 +868,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) { }, indent: function(state, textAfter) { - if (state.tokenize == tokenComment) return CodeMirror.Pass; + if (state.tokenize == tokenComment || state.tokenize == tokenQuasi) return CodeMirror.Pass; if (state.tokenize != tokenBase) return 0; var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical, top // Kludge to prevent 'maybelse' from blocking lexical scope pops