Check out Programming in Lua:
http://www.lua.org/pil/1.3.html
In particular:
Lua also offers block comments, which start with --[[ and run until the corresponding ]].
So, you started a comment with --[[ and then ended it with:
foo[foo[k]] is foo["Caption"]
In other words, it tried to understand "is foo["Caption"] ".
I usually use --]] to end comments, as explained on the same page:
A common trick, when we want to comment out a piece of code,
is to write the following:
--[[
print(10) -- no action (comment)
--]]
Now, if we add a single hyphen to the first line, the code is in again:
---[[
print(10) --> 10
--]]
Thus you have probably got used to expecting --]] as a comment terminator.
Your solution is to use the Lua "extended string" syntax, like this:
--[=[
The above obfuscated, yet cool code ...
blah blah foo[foo[k]] blah
--]=]
Now the sequence ]=] terminates the comment. If you might have ]=] in the text you can use --[==[ ... -- ]==] and so on.
Quote:
Oddly, this doesn't compile either.
--[[ ...
--...
--...
--]]
That compiled for me. You probably did the same thing to test it.