Skip to content

Commit 0e62e03

Browse files
sim642jonludlam
authored andcommitted
Use Link.comment_nestable_block_element_list for lists as well
1 parent ced94e3 commit 0e62e03

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/xref2/link.ml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -224,13 +224,7 @@ and comment_nestable_block_element env parent ~loc:_
224224
| `List (x, ys) ->
225225
`List
226226
( x,
227-
List.rev_map
228-
(fun x ->
229-
List.rev_map
230-
(with_location (comment_nestable_block_element env parent))
231-
x
232-
|> List.rev)
233-
ys
227+
List.rev_map (comment_nestable_block_element_list env parent) ys
234228
|> List.rev )
235229
| `Modules refs ->
236230
let refs =
@@ -259,7 +253,8 @@ and comment_nestable_block_element env parent ~loc:_
259253

260254
and comment_nestable_block_element_list env parent
261255
(xs : Comment.nestable_block_element Comment.with_location list) =
262-
List.map (with_location (comment_nestable_block_element env parent)) xs
256+
List.rev_map (with_location (comment_nestable_block_element env parent)) xs
257+
|> List.rev
263258

264259
and comment_tag env parent ~loc:_ (x : Comment.tag) =
265260
match x with

0 commit comments

Comments
 (0)