← every case · 3000 · escapes and the closing quote

3017-escaped_hole_opener_inside_a_template

a backslash before ${ in a JavaScript template literal makes it text, so no hole opens and the second backtick ends the template. A counter that opens a hole there reads that backtick as a template inside the hole, which runs to the end of the file and hides the block comment after it

read ascloc.defaultcloc.docstring-as-codecodestats.defaultmezura.contentmezura.regionscc.defaulttokei.default
input.js
1codeconst s = `cost: \${`; /* a real comment
2commentsthat closes on this line */
3codelet y = 1;

stringcommentthe tag around another language

What each tool answered

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

cloc --json --config /tmp/linejudge-empty-file cases/3000-escapes_and_the_closing_quote/3017-escaped_hole_opener_inside_a_template/input.js

cloc.default ✓ agrees

--strip-str-comments

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

cloc --json --config /tmp/linejudge-empty-file cases/3000-escapes_and_the_closing_quote/3017-escaped_hole_opener_inside_a_template/input.js --strip-str-comments

cloc.docstring-as-code ✓ agrees
the rules ask3 lines · 0 blanks · 2 code · 1 comments
it answers3 lines · 0 blanks · 2 code · 1 comments

cloc --json --config /tmp/linejudge-empty-file cases/3000-escapes_and_the_closing_quote/3017-escaped_hole_opener_inside_a_template/input.js --docstring-as-code

codestats.default ✓ agrees
the rules ask3 lines · 0 blanks · 2 code · 1 comments
it answers3 lines · 0 blanks · 2 code · 1 comments

codestats cases/3000-escapes_and_the_closing_quote/3017-escaped_hole_opener_inside_a_template/input.js --output json-compact --include-generated --no-gitignore --hidden --no-config

mezura.content ✓ agrees
the rules ask3 lines · 2 code · 1 comments · 0 extra
it answers3 lines · 2 code · 1 comments · 0 extra

mezura cases/3000-escapes_and_the_closing_quote/3017-escaped_hole_opener_inside_a_template/input.js --output json --hide timing --no-default-config --no-local --counting content

mezura.region ✓ agrees
the rules ask3 lines · 0 blanks · 2 code · 1 comments
it answers3 lines · 0 blanks · 2 code · 1 comments

mezura cases/3000-escapes_and_the_closing_quote/3017-escaped_hole_opener_inside_a_template/input.js --output json --hide timing --no-default-config --no-local --counting region

scc.default ✓ agrees
the rules ask3 lines · 0 blanks · 2 code · 1 comments
it answers3 lines · 0 blanks · 2 code · 1 comments

scc --format json --no-config cases/3000-escapes_and_the_closing_quote/3017-escaped_hole_opener_inside_a_template/input.js

tokei.default ✓ agrees
the rules ask3 lines · 0 blanks · 2 code · 1 comments
it answers3 lines · 0 blanks · 2 code · 1 comments

tokei --output json cases/3000-escapes_and_the_closing_quote/3017-escaped_hole_opener_inside_a_template/input.js