← every case · 2000 · string forms
an apostrophe inside the body of a shell heredoc. The word that ends a heredoc is chosen where it is written, so no fixed list of comment and string symbols can say what closes this one
| 1 | codecodecodecodecode | cat <<TEXT |
| 2 | codecodecodecodecode | it's fine in here |
| 3 | codecodecodecodecode | TEXT |
| 4 | commentscommentscommentscommentscomments | # a real comment |
| 5 | commentscommentscommentscommentscomments | # a second real comment |
stringcommentthe tag around another language
cloc --json cases/2000-string_forms/2120-heredoc_holding_an_apostrophe/input.sh
the apostrophe opens a string and every comment under it is counted as code
mezura cases/2000-string_forms/2120-heredoc_holding_an_apostrophe/input.sh --output json --hide timing --counting content
the apostrophe opens a string and every comment under it is counted as code
mezura cases/2000-string_forms/2120-heredoc_holding_an_apostrophe/input.sh --output json --hide timing --counting region
the apostrophe opens a string and every comment under it is counted as code
scc --format json cases/2000-string_forms/2120-heredoc_holding_an_apostrophe/input.sh
the apostrophe opens a string and every comment under it is counted as code
tokei --output json cases/2000-string_forms/2120-heredoc_holding_an_apostrophe/input.sh