← every case · 6000 · another language inside the file

6010-html_has_no_strings

HTML has no strings of its own, so the apostrophe in the word it's is text like everything around it and opens nothing. A comment opens after it on the same line, so a counter that opens a string at the apostrophe hides the comment, whether its strings end with the line or run on

read ascloc.defaultcloc.docstring-as-codecodestats.defaultmezura.contentmezura.regionscc.defaulttokei.default
input.html
1code<p>it's fine, an apostrophe is not a string</p> <!-- a real comment
2commentsthat closes on this line -->
3code<p>more markup</p>

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/6000-another_language_inside_the_file/6010-html_has_no_strings/input.html

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/6000-another_language_inside_the_file/6010-html_has_no_strings/input.html --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/6000-another_language_inside_the_file/6010-html_has_no_strings/input.html --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/6000-another_language_inside_the_file/6010-html_has_no_strings/input.html --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/6000-another_language_inside_the_file/6010-html_has_no_strings/input.html --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/6000-another_language_inside_the_file/6010-html_has_no_strings/input.html --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/6000-another_language_inside_the_file/6010-html_has_no_strings/input.html

tokei.default ✗ fails

the apostrophe opens a string, so the comment after it is counted as markup

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

tokei --output json cases/6000-another_language_inside_the_file/6010-html_has_no_strings/input.html