← every case · 2000 · string forms
a Lua comment opened with one equals sign, ended by a line reading ]]=]. The bare ]] at the front of that line matches nothing, and the real closer ]=] begins one character inside it, so a counter searching left to right finds the wrong one first
| 1 | commentscommentscommentscommentscomments | --[=[ a level one comment |
| 2 | commentsextracommentscommentscomments | ]]=] |
| 3 | codecodecodecodecode | x = 1 |
stringcommentthe tag around another language
cloc --json cases/2000-string_forms/2180-lua_short_closer_hiding_the_real_one/input.lua
mezura cases/2000-string_forms/2180-lua_short_closer_hiding_the_real_one/input.lua --output json --hide timing --counting content
mezura cases/2000-string_forms/2180-lua_short_closer_hiding_the_real_one/input.lua --output json --hide timing --counting region
scc --format json cases/2000-string_forms/2180-lua_short_closer_hiding_the_real_one/input.lua
its Lua carries only --[[ , so --[=[ reads as an ordinary -- line comment and the two lines under it count as code, whatever the closer is written like
tokei --output json cases/2000-string_forms/2180-lua_short_closer_hiding_the_real_one/input.lua