← every case · 3000 · escapes and the closing quote
the other PowerShell string form escapes nothing inside itself, so the backtick can only speak outside it, where it stops the apostrophe from opening anything. A block comment opens after it on the same line, so a counter that opens a string at the apostrophe hides the comment, whether its strings end with the line or run on
| 1 | codecodecodecodecodecodecode | Write-Host `'literal <# a real comment |
| 2 | commentscommentscommentscommentscommentscommentscomments | that closes on this line #> |
| 3 | codecodecodecodecodecodecode | $x = 1 |
stringcommentthe tag around another language
cloc --json --config /tmp/linejudge-empty-file cases/3000-escapes_and_the_closing_quote/3090-backtick_before_a_single_quoted_string/input.ps1
--strip-str-comments
cloc --json --config /tmp/linejudge-empty-file cases/3000-escapes_and_the_closing_quote/3090-backtick_before_a_single_quoted_string/input.ps1 --strip-str-comments
cloc --json --config /tmp/linejudge-empty-file cases/3000-escapes_and_the_closing_quote/3090-backtick_before_a_single_quoted_string/input.ps1 --docstring-as-code
codestats cases/3000-escapes_and_the_closing_quote/3090-backtick_before_a_single_quoted_string/input.ps1 --output json-compact --include-generated --no-gitignore --hidden --no-config
mezura cases/3000-escapes_and_the_closing_quote/3090-backtick_before_a_single_quoted_string/input.ps1 --output json --hide timing --no-default-config --no-local --counting content
mezura cases/3000-escapes_and_the_closing_quote/3090-backtick_before_a_single_quoted_string/input.ps1 --output json --hide timing --no-default-config --no-local --counting region
scc --format json --no-config cases/3000-escapes_and_the_closing_quote/3090-backtick_before_a_single_quoted_string/input.ps1
the apostrophe opens a string, and that form crosses lines, so everything after it is string
tokei --output json cases/3000-escapes_and_the_closing_quote/3090-backtick_before_a_single_quoted_string/input.ps1