getPrecedingDocstring's `skipTrailing`, `skipDetached` and `skipDirectives`, which Go turns on together for the doc comment go doc shows. The comments the run opens with that belong to the line above are left out: one written after code on its line (`const n = 4 // four.`), and any that begins on the line such a comment ends. Of the rest, only the comments that end on the line right above the decl
(node: Node, src: &str)
| 159 | /// directive among them (`//go:embed static`, `//nolint:errcheck`) is left out |
| 160 | /// of the text. |
| 161 | pub fn preceding_go_doc_comment(node: Node, src: &str) -> Option<String> { |
| 162 | preceding_docstring_with(node, src, &[], true, true, true) |
| 163 | } |
| 164 | |
| 165 | fn preceding_docstring_with( |
| 166 | node: Node, |
no test coverage detected