← every case · 2000 · string forms
an apostrophe inside a PowerShell here string. The body of a here string is literal and it ends only at a closer sitting at the start of a line, so the apostrophe in the word is a byte. The line under it begins with #, so a counter that ends the string at the apostrophe, or reads no here string at all, counts that line as a comment. Two real comments follow the closer, so a counter that also opens a string there and lets it run on loses both and cannot land on the right totals
| 1 | codecodecodecodecodecodecode | $s = @' |
| 2 | codecodecodecodecodecodecode | it is a here string with an apostrophe: don't |
| 3 | codecodecodecodecodecodecode | # and this line is inside it too |
| 4 | codecodecodecodecodecodecode | '@ |
| 5 | commentscommentscommentscommentscommentscommentscomments | # a real comment |
| 6 | commentscommentscommentscommentscommentscommentscomments | # a second real comment |
| 7 | codecodecodecodecodecodecode | $x = 1 |
stringcommentthe tag around another language
it reads no here strings, so the line beginning with # inside one counts as a comment
cloc --json --config /tmp/linejudge-empty-file cases/2000-string_forms/2110-here_string_holding_an_apostrophe/input.ps1
--strip-str-comments
it reads no here strings, so the line beginning with # inside one counts as a comment
cloc --json --config /tmp/linejudge-empty-file cases/2000-string_forms/2110-here_string_holding_an_apostrophe/input.ps1 --strip-str-comments
it reads no here strings, so the line beginning with # inside one counts as a comment
cloc --json --config /tmp/linejudge-empty-file cases/2000-string_forms/2110-here_string_holding_an_apostrophe/input.ps1 --docstring-as-code
codestats cases/2000-string_forms/2110-here_string_holding_an_apostrophe/input.ps1 --output json-compact --include-generated --no-gitignore --hidden --no-config
mezura cases/2000-string_forms/2110-here_string_holding_an_apostrophe/input.ps1 --output json --hide timing --no-default-config --no-local --counting content
mezura cases/2000-string_forms/2110-here_string_holding_an_apostrophe/input.ps1 --output json --hide timing --no-default-config --no-local --counting region
it reads no here strings, so the line beginning with # inside one counts as a comment, and it answers the same with the apostrophe taken out
scc --format json --no-config cases/2000-string_forms/2110-here_string_holding_an_apostrophe/input.ps1
tokei --output json cases/2000-string_forms/2110-here_string_holding_an_apostrophe/input.ps1