Lua multiline comments past ]]’s

As you can see in Strings tutorial there is a special [===[ syntax for nesting square braces. You can use it in block comments too. Just note, that number of = signs must be the same in open and close sequence.

For example 5 equals will work.

--[=====[ 
for k,v in pairs(t) do
   local d = fullToShort[k]
   local col = xColours[v[1]] -- It stops here!
   cecho(string.format(("<%s>%s ", col, d))
end
--]=====]

Leave a Comment