← every case · 6000 · another language inside the file

6040-script_tag_in_upper_case

HTML reads its tag names without regard to case, so an upper case SCRIPT opens a script element exactly as a lower case one does

read ascloc.defaultmezura.contentmezura.regionscc.defaulttokei.default
input.html
1code<p>before</p>
2code<SCRIPT>
3comments JavaScript// a js comment
4code JavaScriptvar x = 1;
5code</SCRIPT>
6code<p>after</p>

stringcommentthe tag around another language

What each tool answered

cloc.default ✗ fails

no script block is separated out of the page at all, so the case of the tag never comes up: the same file written in lower case is counted exactly the same way

the rules ask6 lines · 0 blanks · 5 code · 1 comments · JavaScript 2
it answers6 lines · 0 blanks · 6 code · 0 comments

cloc --json cases/6000-another_language_inside_the_file/6040-script_tag_in_upper_case/input.html

mezura.content ✓ agrees
the rules ask6 lines · 5 code · 1 comments · 0 extra · JavaScript 2
it answers6 lines · 5 code · 1 comments · 0 extra · JavaScript 2

mezura cases/6000-another_language_inside_the_file/6040-script_tag_in_upper_case/input.html --output json --hide timing --counting content

mezura.region ✓ agrees
the rules ask6 lines · 0 blanks · 5 code · 1 comments · JavaScript 2
it answers6 lines · 0 blanks · 5 code · 1 comments · JavaScript 2

mezura cases/6000-another_language_inside_the_file/6040-script_tag_in_upper_case/input.html --output json --hide timing --counting region

scc.default ✗ fails

no script block is separated out of any page, whatever case its tag is written in, so the comment inside it counts as markup

the rules ask6 lines · 0 blanks · 5 code · 1 comments · JavaScript 2
it answers6 lines · 0 blanks · 6 code · 0 comments

scc --format json cases/6000-another_language_inside_the_file/6040-script_tag_in_upper_case/input.html

tokei.default ✗ fails

the tag is not recognised, so the block is not found and the comment inside it counts as markup

the rules ask6 lines · 0 blanks · 5 code · 1 comments · JavaScript 2
it answers6 lines · 0 blanks · 6 code · 0 comments

tokei --output json cases/6000-another_language_inside_the_file/6040-script_tag_in_upper_case/input.html