← every case · 7000 · literals with their own delimiters

7020-regex_holding_a_comment_opener

a block comment opener inside a JavaScript regular expression. Knowing that the slash begins a pattern and not a division takes reading what came before it, which is more than any counter here attempts. What each of them does with the opener after that is its own

read ascloc.defaultmezura.contentmezura.regionscc.defaulttokei.default
input.js
1codelet re = /a[/*]b/;
2codelet x = 1;
3codelet y = 2;

stringcommentthe tag around another language

What each tool answered

cloc.default ✓ agrees
the rules ask3 lines · 0 blanks · 3 code · 0 comments
it answers3 lines · 0 blanks · 3 code · 0 comments

cloc --json cases/7000-literals_with_their_own_delimiters/7020-regex_holding_a_comment_opener/input.js

mezura.content ✗ fails

the /* opens a comment and swallows the two lines under it

the rules ask3 lines · 3 code · 0 comments · 0 extra
it answers3 lines · 1 code · 2 comments · 0 extra

mezura cases/7000-literals_with_their_own_delimiters/7020-regex_holding_a_comment_opener/input.js --output json --hide timing --counting content

mezura.region ✗ fails

the /* opens a comment and swallows the two lines under it

the rules ask3 lines · 0 blanks · 3 code · 0 comments
it answers3 lines · 0 blanks · 1 code · 2 comments

mezura cases/7000-literals_with_their_own_delimiters/7020-regex_holding_a_comment_opener/input.js --output json --hide timing --counting region

scc.default ✗ fails

the /* opens a comment and swallows the two lines under it

the rules ask3 lines · 0 blanks · 3 code · 0 comments
it answers3 lines · 0 blanks · 1 code · 2 comments

scc --format json cases/7000-literals_with_their_own_delimiters/7020-regex_holding_a_comment_opener/input.js

tokei.default ✗ fails

the /* opens a comment and swallows the two lines under it

the rules ask3 lines · 0 blanks · 3 code · 0 comments
it answers3 lines · 0 blanks · 1 code · 2 comments

tokei --output json cases/7000-literals_with_their_own_delimiters/7020-regex_holding_a_comment_opener/input.js