@@ -4498,27 +4498,14 @@ and print_jsx_container_tag ~state tag_name
44984498 (closing_tag : Parsetree.jsx_closing_container_tag option )
44994499 (pexp_loc : Location.t ) cmt_tbl =
45004500 let name = print_jsx_name tag_name.txt in
4501- let last_prop_has_comment_after =
4502- let rec visit props =
4503- match props with
4504- | [] -> None
4505- | [x] -> Some x
4506- | _ :: xs -> visit xs
4507- in
4508- let last_prop = visit props in
4509- match last_prop with
4510- | None -> false
4511- | Some last_prop ->
4512- has_trailing_comments cmt_tbl (ParsetreeViewer. get_jsx_prop_loc last_prop)
4513- in
45144501 let opening_greater_than_loc =
45154502 {
45164503 Warnings. loc_start = opening_greater_than;
45174504 loc_end = opening_greater_than;
45184505 loc_ghost = false ;
45194506 }
45204507 in
4521- let opening_greater_than_has_leading_comments , opening_greater_than_doc =
4508+ let _opening_greater_than_has_leading_comments , opening_greater_than_doc =
45224509 let has_leading_comments =
45234510 has_leading_comments cmt_tbl opening_greater_than_loc
45244511 in
@@ -4586,11 +4573,7 @@ and print_jsx_container_tag ~state tag_name
45864573 (* if the element name has a single comment on the same line, force newline before '>' *)
45874574 if has_trailing_single_line_comment cmt_tbl tag_loc then
45884575 Doc. concat [Doc. hard_line; opening_greater_than_doc]
4589- else if
4590- last_prop_has_comment_after
4591- || opening_greater_than_has_leading_comments
4592- then Doc. concat [Doc. soft_line; opening_greater_than_doc]
4593- else opening_greater_than_doc
4576+ else Doc. concat [Doc. soft_line; opening_greater_than_doc]
45944577 in
45954578 Doc. concat
45964579 [
0 commit comments