tokei
tokei copied to clipboard
Blank lines in multiline comments counted as blanks
If a multiline comment contains blank lines, those lines get counted as "blank" instead of being part of the multiline comment. For example:
/* blank lines follow
*/
will yield this output (using .rs extension for sake of example):
Language Files Lines Code Comments Blanks
---------------------------------------------------------------------------------------------
Rust 1 9 0 2 7
Is this intended behavior? While the lines are technically blank, they are also a part of the multiline comment.
Thank you for this issue. While I can see the case for them being comments the question I would wonder if syntactically are these blank lines significant in any language, such that counting them as blanks is an unintuitive behaviour?
I think those blank lines should still be comments.
Blank lines in strings should also be counted as code.
My argument is: it is just like how people put {, }, [, ], (, )
on a single line (and lose some contests!) no matter how insignificant it seems.
echo '{
M
Y
S
T
Y
L
E
}'
Blank lines in comments can also be used by document generators (e.g. as divider) but still is part of the comments.