File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -4448,10 +4448,15 @@ and print_jsx_children ~state (children_expr : Parsetree.expression) ~sep
44484448 | Braced braces_loc ->
44494449 print_comments (add_parens_or_braces expr_doc) cmt_tbl braces_loc
44504450 in
4451+ let get_first_leading_comment loc =
4452+ match get_first_leading_comment cmt_tbl loc with
4453+ | None -> loc
4454+ | Some comment -> Comment. loc comment
4455+ in
44514456 let get_loc expr =
44524457 match ParsetreeViewer. process_braces_attr expr with
4453- | None , _ -> expr.pexp_loc
4454- | Some ({loc} , _ ), _ -> loc
4458+ | None , _ -> get_first_leading_comment expr.pexp_loc
4459+ | Some ({loc} , _ ), _ -> get_first_leading_comment loc
44554460 in
44564461 let rec loop prev acc exprs =
44574462 match exprs with
You can’t perform that action at this time.
0 commit comments