Skip to content

Commit 069b961

Browse files
Julowjonludlam
authored andcommitted
Doesn't handle lists when computing the synopsis
1 parent 4a0a17b commit 069b961

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

src/model/comment.ml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,8 @@ type docs = block_element with_location list
8686

8787
type docs_or_stop = [ `Docs of docs | `Stop ]
8888

89-
(** The synopsis is the first element of a comment if it is a paragraph or a
90-
list. In the case of a list, the first item is considered. Otherwise, there
91-
is no synopsis. *)
92-
let rec synopsis docs =
93-
let open Location_ in
94-
match docs with
95-
| { value = `Paragraph p; _ } :: _ -> Some p
96-
| { value = `List (_, first_item :: _); _ } :: _ ->
97-
synopsis (first_item :> docs)
89+
(** The synopsis is the first element of a comment if it is a paragraph.
90+
Otherwise, there is no synopsis. *)
91+
let synopsis = function
92+
| { Location_.value = `Paragraph p; _ } :: _ -> Some p
9893
| _ -> None

0 commit comments

Comments
 (0)