← every case · 6000 · another language inside the file

6030-opening_tag_split_over_two_lines

a script tag whose opening is split over two lines, which is legal HTML. A counter looking for the whole tag on one line never sees it, and reads the JavaScript under it as markup

read ascloc.defaultmezura.contentmezura.regionscc.defaulttokei.default
input.html
1code<script
2code type="text/javascript">
3comments JavaScript// a comment inside the script
4code JavaScriptvar x = 1;
5code</script>

stringcommentthe tag around another language

What each tool answered

cloc.default ✗ fails

the file is counted as one language from beginning to end and no script block is separated out however its tag is written, so the js comment inside it counts as markup

the rules ask5 lines · 0 blanks · 4 code · 1 comments · JavaScript 2
it answers5 lines · 0 blanks · 5 code · 0 comments

cloc --json cases/6000-another_language_inside_the_file/6030-opening_tag_split_over_two_lines/input.html

mezura.content ✗ fails

the block is not found, so the comment inside it is read with the page's symbols, and HTML has no //

the rules ask5 lines · 4 code · 1 comments · 0 extra · JavaScript 2
it answers5 lines · 5 code · 0 comments · 0 extra

mezura cases/6000-another_language_inside_the_file/6030-opening_tag_split_over_two_lines/input.html --output json --hide timing --counting content

mezura.region ✗ fails

the block is not found, so the comment inside it is read with the page's symbols, and HTML has no //

the rules ask5 lines · 0 blanks · 4 code · 1 comments · JavaScript 2
it answers5 lines · 0 blanks · 5 code · 0 comments

mezura cases/6000-another_language_inside_the_file/6030-opening_tag_split_over_two_lines/input.html --output json --hide timing --counting region

scc.default ✗ fails

the block is not found, so the comment inside it is read with the page's symbols, and HTML has no //

the rules ask5 lines · 0 blanks · 4 code · 1 comments · JavaScript 2
it answers5 lines · 0 blanks · 5 code · 0 comments

scc --format json cases/6000-another_language_inside_the_file/6030-opening_tag_split_over_two_lines/input.html

tokei.default ✗ fails

the block is not found, so the comment inside it is read with the page's symbols, and HTML has no //

the rules ask5 lines · 0 blanks · 4 code · 1 comments · JavaScript 2
it answers5 lines · 0 blanks · 5 code · 0 comments

tokei --output json cases/6000-another_language_inside_the_file/6030-opening_tag_split_over_two_lines/input.html