← every case · 6000 · another language inside the file
a script element ends at the first closing tag whatever the JavaScript around it is doing, which is why one writes the closer with a backslash inside a string. So the block here holds no whole line, and everything under the closer is markup, including what looks like a comment
| 1 | codecodecodecodecodecode | <p>before</p> |
| 2 | codecodecodecodecodecode | <script> |
| 3 | codecodecodecodecodecode | var s = "</script>"; |
| 4 | codecodecodecodecodecode | // not a comment: the script element ended on the line above |
| 5 | codecodecodecodecodecode | <p>after</p> |
stringcommentthe tag around another language
cloc --json cases/6000-another_language_inside_the_file/6060-script_closer_inside_a_string/input.html
--strip-str-comments
cloc --json cases/6000-another_language_inside_the_file/6060-script_closer_inside_a_string/input.html --strip-str-comments
cloc --json cases/6000-another_language_inside_the_file/6060-script_closer_inside_a_string/input.html --docstring-as-code
mezura cases/6000-another_language_inside_the_file/6060-script_closer_inside_a_string/input.html --output json --hide timing --no-default-config --no-local --counting content
mezura cases/6000-another_language_inside_the_file/6060-script_closer_inside_a_string/input.html --output json --hide timing --no-default-config --no-local --counting region
scc --format json cases/6000-another_language_inside_the_file/6060-script_closer_inside_a_string/input.html
the closing line is counted once as markup and once as script, so the file is reported as one line longer than it is
tokei --output json cases/6000-another_language_inside_the_file/6060-script_closer_inside_a_string/input.html