When we usually end a multi-line comment using ]], we can accidentally end the comment (such as commenting out code that makes use of tables or dictionaries.)
Here is an example:
01 | local list = { 'a' , 'b' , 'c' } |
02 | local example = { a = 1 , b = 2 , c = 3 } |
When we run this, we get an error: unexpected symbol near ']'
To leverage this situation, we can add an equal sign in the front and back (or more) to define a new delimiter to end the comment. The catch is that it needs to be have equal amount of signs in the beginning at the end.
01 | local list = { 'a' , 'b' , 'c' } |
03 | local example = { a = 1 , b = 2 , c = 3 } |
When we run this, it prints as expected: true
If this answers your question, please accept this as the solution.