mirror of
https://github.com/denoland/deno.git
synced 2025-10-02 15:14:33 +00:00
fix(doc): handle comments at the top of the file (#5891)
This commit is contained in:
parent
f8c6500eef
commit
f6e58b076c
2 changed files with 9 additions and 2 deletions
|
@ -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('*')
|
||||
})?;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue