diff options
author | Matt Dumler <mattd3v@pm.me> | 2020-05-27 16:38:36 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-27 23:38:36 +0200 |
commit | f6e58b076ca430c29f164b65678bbf6bc64a39b7 (patch) | |
tree | 68a7102c6b7bb6643ce7aa5cc60fa143fbc420e8 /cli/doc/parser.rs | |
parent | f8c6500eef59e046f4fd90d3c37a1e16606a0a78 (diff) |
fix(doc): handle comments at the top of the file (#5891)
Diffstat (limited to 'cli/doc/parser.rs')
-rw-r--r-- | cli/doc/parser.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cli/doc/parser.rs b/cli/doc/parser.rs index 9215637c5..3746e3dfb 100644 --- a/cli/doc/parser.rs +++ b/cli/doc/parser.rs @@ -530,7 +530,7 @@ impl DocParser { pub fn js_doc_for_span(&self, span: Span) -> Option<String> { let comments = self.ast_parser.get_span_comments(span); - let js_doc_comment = comments.iter().find(|comment| { + let js_doc_comment = comments.iter().rev().find(|comment| { comment.kind == CommentKind::Block && comment.text.starts_with('*') })?; |