Skip to content
Snippets Groups Projects
Commit dd839b50 authored by Marijn Haverbeke's avatar Marijn Haverbeke
Browse files

[go mode] Return Pass when commenting inside string/comment

Closes #4739
parent b9d04425
No related branches found
No related tags found
Loading
......@@ -162,7 +162,7 @@ CodeMirror.defineMode("go", function(config) {
},
indent: function(state, textAfter) {
if (state.tokenize != tokenBase && state.tokenize != null) return 0;
if (state.tokenize != tokenBase && state.tokenize != null) return CodeMirror.Pass;
var ctx = state.context, firstChar = textAfter && textAfter.charAt(0);
if (ctx.type == "case" && /^(?:case|default)\b/.test(textAfter)) {
state.context.type = "}";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment