← every case · 2000 · string forms
a line comment symbol inside a template literal is text
| 1 | codecodecodecodecode | let t = `a template |
| 2 | codecodecodecodecode | // not a comment, it is inside the template |
| 3 | codecodecodecodecode | still the template`; |
| 4 | codecodecodecodecode | let x = 1; |
stringcommentthe tag around another language
a // at the head of a line opens a comment inside a backtick template as readily as outside one, so that line of template text counts as a comment
cloc --json cases/2000-string_forms/2060-backtick_template_holding_a_comment/input.js
mezura cases/2000-string_forms/2060-backtick_template_holding_a_comment/input.js --output json --hide timing --counting content
mezura cases/2000-string_forms/2060-backtick_template_holding_a_comment/input.js --output json --hide timing --counting region
scc --format json cases/2000-string_forms/2060-backtick_template_holding_a_comment/input.js
tokei --output json cases/2000-string_forms/2060-backtick_template_holding_a_comment/input.js