← every case · 2000 · string forms

2170-lua_level_bracket_holding_plain_close

Lua opens a long comment with any number of equals signs between its brackets, and only a closer carrying the same number ends it. A bare ]] further down is text

read ascloc.defaultmezura.contentmezura.regionscc.defaulttokei.default
input.lua
1comments--[==[ a long comment
2comments]] this is text, not the end
3comments]==]
4codex = 1

stringcommentthe tag around another language

What each tool answered

cloc.default ✓ agrees
the rules ask4 lines · 0 blanks · 1 code · 3 comments
it answers4 lines · 0 blanks · 1 code · 3 comments

cloc --json cases/2000-string_forms/2170-lua_level_bracket_holding_plain_close/input.lua

mezura.content ✓ agrees
the rules ask4 lines · 1 code · 2 comments · 1 extra
it answers4 lines · 1 code · 2 comments · 1 extra

mezura cases/2000-string_forms/2170-lua_level_bracket_holding_plain_close/input.lua --output json --hide timing --counting content

mezura.region ✓ agrees
the rules ask4 lines · 0 blanks · 1 code · 3 comments
it answers4 lines · 0 blanks · 1 code · 3 comments

mezura cases/2000-string_forms/2170-lua_level_bracket_holding_plain_close/input.lua --output json --hide timing --counting region

scc.default ✓ agrees
the rules ask4 lines · 0 blanks · 1 code · 3 comments
it answers4 lines · 0 blanks · 1 code · 3 comments

scc --format json cases/2000-string_forms/2170-lua_level_bracket_holding_plain_close/input.lua

tokei.default ✗ fails

its Lua carries only --[[ , so --[==[ reads as an ordinary -- line comment that ends with its own line and the three lines under it count as code. A file holding no bare ]] counts the same way

the rules ask4 lines · 0 blanks · 1 code · 3 comments
it answers4 lines · 0 blanks · 3 code · 1 comments

tokei --output json cases/2000-string_forms/2170-lua_level_bracket_holding_plain_close/input.lua