Skip to content

Commit 506dda3

Browse files
committed
Better indentation of children
1 parent 6a3f4c9 commit 506dda3

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

compiler/syntax/src/res_printer.ml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4342,7 +4342,16 @@ and print_jsx_container_tag ~state tag_name props
43424342
let line_sep = Doc.line in
43434343
let print_children children =
43444344
Doc.group
4345-
(Doc.indent (print_jsx_children ~sep:line_sep ~state children cmt_tbl))
4345+
(Doc.concat
4346+
[
4347+
Doc.indent
4348+
(Doc.concat
4349+
[
4350+
Doc.line;
4351+
print_jsx_children ~sep:line_sep ~state children cmt_tbl;
4352+
]);
4353+
Doc.line;
4354+
])
43464355
in
43474356

43484357
Doc.group
@@ -4370,9 +4379,7 @@ and print_jsx_container_tag ~state tag_name props
43704379
]);
43714380
Doc.concat
43724381
[
4373-
(if has_children then Doc.line else Doc.nil);
43744382
(if has_children then print_children children else Doc.nil);
4375-
(if has_children then Doc.line else Doc.nil);
43764383
Doc.text "</";
43774384
name;
43784385
Doc.greater_than;

0 commit comments

Comments
 (0)