@@ -769,9 +769,9 @@ type if_then_else =
769
769
; break_end_branch : Fmt .t
770
770
; space_between_branches : Fmt .t }
771
771
772
- let get_if_then_else (c : Conf.t ) ~first ~last ~parens_bch ~ parens_prev_bch
773
- ~xcond ~xbch ~expr_loc ~fmt_extension_suffix ~ fmt_attributes ~ fmt_cond
774
- ~cmts_before_kw ~cmts_after_kw =
772
+ let get_if_then_else (c : Conf.t ) ~pro ~ first ~last ~parens_bch
773
+ ~parens_prev_bch ~ xcond ~xbch ~expr_loc ~fmt_extension_suffix
774
+ ~fmt_attributes ~ fmt_cond ~ cmts_before_kw ~cmts_after_kw =
775
775
let imd = c.fmt_opts.indicate_multiline_delimiters.v in
776
776
let beginend, branch_expr =
777
777
let ast = xbch.Ast. ast in
@@ -803,13 +803,15 @@ let get_if_then_else (c : Conf.t) ~first ~last ~parens_bch ~parens_prev_bch
803
803
hvbox 2
804
804
( hvbox 0
805
805
( hvbox 2
806
- ( fmt_if (not first) (str " else " )
806
+ ( pro
807
+ $ fmt_if (not first) (str " else " )
807
808
$ str " if"
808
809
$ fmt_if first (fmt_opt fmt_extension_suffix)
809
810
$ fmt_attributes $ space_break $ fmt_cond xcnd )
810
811
$ space_break $ cmts_before_kw $ str " then" )
811
812
$ opt cmts_after_kw Fn. id )
812
- | None -> cmts_before_kw $ hvbox 2 (str " else" $ opt cmts_after_kw Fn. id)
813
+ | None ->
814
+ cmts_before_kw $ hvbox 2 (pro $ str " else" $ opt cmts_after_kw Fn. id)
813
815
in
814
816
let branch_pro ?(indent = 2 ) () =
815
817
if Option. is_some cmts_after_kw then break 1000 indent
@@ -901,7 +903,8 @@ let get_if_then_else (c : Conf.t) ~first ~last ~parens_bch ~parens_prev_bch
901
903
match xcond with
902
904
| Some xcond ->
903
905
hvbox 2
904
- ( fmt_or first
906
+ ( pro
907
+ $ fmt_or first
905
908
(str " if" $ fmt_opt fmt_extension_suffix)
906
909
(str " else if" )
907
910
$ fmt_attributes $ space_break $ fmt_cond xcond
0 commit comments