lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I was playing in ROBLOX studio that uses the Lua library and I noticed something strange with the square brackets. Rather than taking the outermost closing square bracket it took the next one when commenting out sections of code.

This is the correct behaviour. When in a comment code is not parsed and square brackets do not need to be balanced as is the case in strings. To allow long comments with ']]' you could use --[=[ comment with ]] and ends with ]=].

Regards,
Xmilia