diff --git a/mode/clike/clike.js b/mode/clike/clike.js
index <HASH>..<HASH> 100644
--- a/mode/clike/clike.js
+++ b/mode/clike/clike.js
@@ -140,6 +140,7 @@ CodeMirror.defineMode("clike", function(config, parserConfig) {
     },
 
     indent: function(state, textAfter) {
+      if (state.tokenize == tokenComment) return CodeMirror.Pass;
       if (state.tokenize != tokenBase && state.tokenize != null) return 0;
       var ctx = state.context, firstChar = textAfter && textAfter.charAt(0);
       if (ctx.type == "statement" && firstChar == "}") ctx = ctx.prev;
diff --git a/mode/javascript/javascript.js b/mode/javascript/javascript.js
index <HASH>..<HASH> 100644
--- a/mode/javascript/javascript.js
+++ b/mode/javascript/javascript.js
@@ -340,6 +340,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
     },
 
     indent: function(state, textAfter) {
+      if (state.tokenize == jsTokenComment) return CodeMirror.Pass;
       if (state.tokenize != jsTokenBase) return 0;
       var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical;
       if (lexical.type == "stat" && firstChar == "}") lexical = lexical.prev;
[javascript&clike modes] Indent block comments with CodeMirror.Pass

This'll align them with the previous line. It's not a perfect solution,
but probably better than simply returning 0.

Issue #<I>