← every case · 6000 · another language inside the file

6020-comment_opener_inside_an_attribute

a comment opener written inside a quoted attribute value, where HTML reads it as text. The file ends with a closed comment of its own, so a comment opened there by mistake has a closer to reach, and a counter that ignores an opener nobody closes cannot pass by accident

read ascloc.defaultcloc.docstring-as-codecodestats.defaultmezura.contentmezura.regionscc.defaulttokei.default
input.html
1code<div title="<!-- this is text in an attribute">
2code<p>first</p>
3code<p>second</p>
4comments<!-- a real comment -->

stringcommentthe tag around another language

What each tool answered

cloc.default ✗ fails

a comment opener inside a quoted attribute value opens a comment all the same, and the comment ending the file closes it, so both lines between count as comments

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

cloc --json --config /tmp/linejudge-empty-file cases/6000-another_language_inside_the_file/6020-comment_opener_inside_an_attribute/input.html

cloc.default ✗ fails

--strip-str-comments

a comment opener inside a quoted attribute value opens a comment all the same, and the comment ending the file closes it, so both lines between count as comments

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

cloc --json --config /tmp/linejudge-empty-file cases/6000-another_language_inside_the_file/6020-comment_opener_inside_an_attribute/input.html --strip-str-comments

cloc.docstring-as-code ✗ fails

a comment opener inside a quoted attribute value opens a comment all the same, and the comment ending the file closes it, so both lines between count as comments

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

cloc --json --config /tmp/linejudge-empty-file cases/6000-another_language_inside_the_file/6020-comment_opener_inside_an_attribute/input.html --docstring-as-code

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

codestats cases/6000-another_language_inside_the_file/6020-comment_opener_inside_an_attribute/input.html --output json-compact --include-generated --no-gitignore --hidden --no-config

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

mezura cases/6000-another_language_inside_the_file/6020-comment_opener_inside_an_attribute/input.html --output json --hide timing --no-default-config --no-local --counting content

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

mezura cases/6000-another_language_inside_the_file/6020-comment_opener_inside_an_attribute/input.html --output json --hide timing --no-default-config --no-local --counting region

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

scc --format json --no-config cases/6000-another_language_inside_the_file/6020-comment_opener_inside_an_attribute/input.html

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

tokei --output json cases/6000-another_language_inside_the_file/6020-comment_opener_inside_an_attribute/input.html