diff --git a/mode/lua/lua.js b/mode/lua/lua.js
index <HASH>..<HASH> 100644
--- a/mode/lua/lua.js
+++ b/mode/lua/lua.js
@@ -123,8 +123,10 @@ CodeMirror.defineMode("lua", function(config, parserConfig) {
         else if (builtins.test(word)) style = "builtin";
 	else if (specials.test(word)) style = "variable-2";
       }
-      if (indentTokens.test(word)) ++state.indentDepth;
-      else if (dedentTokens.test(word)) --state.indentDepth;
+      if ((style != "lua-comment") && (style != "lua-string")){
+        if (indentTokens.test(word)) ++state.indentDepth;
+        else if (dedentTokens.test(word)) --state.indentDepth;
+      }
       return style;
     },
Indentation bug fix related to multi-line comments and multi-line strings.  Previously if a multi-line comment or string contained the word 'end', it would throw off the indentation level for all following code.