← every case · 1000 · comments
a doc comment that opens on a line which already holds code. The line is code, and the block of documentation that begins on it does not begin at its first character
| 1 | codecodecodecodecodecode Markdown | const NAME: &str = "mezura"; /// A documented function. |
| 2 | commentscommentscommentscommentscommentscomments Markdown | /// The paragraph after it. |
| 3 | codecodecodecodecodecode | fn documented() {} |
stringcommentthe tag around another language
cloc --json cases/1000-comments/1150-doc_comment_opening_after_code/input.rs
--strip-str-comments
cloc --json cases/1000-comments/1150-doc_comment_opening_after_code/input.rs --strip-str-comments
cloc --json cases/1000-comments/1150-doc_comment_opening_after_code/input.rs --docstring-as-code
mezura cases/1000-comments/1150-doc_comment_opening_after_code/input.rs --output json --hide timing --no-default-config --no-local --counting content
mezura cases/1000-comments/1150-doc_comment_opening_after_code/input.rs --output json --hide timing --no-default-config --no-local --counting region
scc --format json cases/1000-comments/1150-doc_comment_opening_after_code/input.rs
the whole of the first line is given to the documentation, so the code in front of the doc marker is counted as a comment and lands in the Markdown block instead of in Rust
tokei --output json cases/1000-comments/1150-doc_comment_opening_after_code/input.rs