diff --git a/lib/Params.ml b/lib/Params.ml index d428c29ff8..62698e9077 100644 --- a/lib/Params.ml +++ b/lib/Params.ml @@ -598,7 +598,9 @@ let get_if_then_else (c : Conf.t) ~first ~last ~parens_bch ~parens_prev_bch ( fmt_or_k first (str "if" $ fmt_opt fmt_extension_suffix) (str "else if") - $ fmt_attributes $ fmt "@ " $ fmt_cond xcnd ) + $ fmt_attributes + $ fmt_or (Option.is_some fmt_extension_suffix) "@ " " " + $ fmt_cond xcnd ) $ fmt "@ " ) ; box_keyword_and_expr= (fun k -> hvbox 2 (fmt_or (Option.is_some xcond) "then" "else" $ k)) diff --git a/test/passing/tests/ite-kw_first.ml.ref b/test/passing/tests/ite-kw_first.ml.ref index 9e06336d81..c3a401fa21 100644 --- a/test/passing/tests/ite-kw_first.ml.ref +++ b/test/passing/tests/ite-kw_first.ml.ref @@ -45,9 +45,8 @@ f ;; f - ( if - and_ even - loooooooooooooooooooooooooooooooooooooooooooooooooooooooooonger + ( if and_ even + loooooooooooooooooooooooooooooooooooooooooooooooooooooooooonger then () else () ) @@ -165,12 +164,10 @@ let _ = xxxxxxxxx yyyyyyyyyy zzzzzzzzzzzz let _ = - if - (* foo *) - foo + if (* foo *) + foo then 0 - else if - (* bar *) - bar + else if (* bar *) + bar then 1 else 2 diff --git a/test/passing/tests/ite-kw_first_closing.ml.ref b/test/passing/tests/ite-kw_first_closing.ml.ref index 64d1228d79..422cec07b1 100644 --- a/test/passing/tests/ite-kw_first_closing.ml.ref +++ b/test/passing/tests/ite-kw_first_closing.ml.ref @@ -52,9 +52,8 @@ f ;; f - ( if - and_ even - loooooooooooooooooooooooooooooooooooooooooooooooooooooooooonger + ( if and_ even + loooooooooooooooooooooooooooooooooooooooooooooooooooooooooonger then () else () ) @@ -180,12 +179,10 @@ let _ = xxxxxxxxx yyyyyyyyyy zzzzzzzzzzzz let _ = - if - (* foo *) - foo + if (* foo *) + foo then 0 - else if - (* bar *) - bar + else if (* bar *) + bar then 1 else 2 diff --git a/test/passing/tests/ite-kw_first_no_indicate.ml.ref b/test/passing/tests/ite-kw_first_no_indicate.ml.ref index ba802a60a0..d0b1ce402b 100644 --- a/test/passing/tests/ite-kw_first_no_indicate.ml.ref +++ b/test/passing/tests/ite-kw_first_no_indicate.ml.ref @@ -45,9 +45,8 @@ f ;; f - (if - and_ even - loooooooooooooooooooooooooooooooooooooooooooooooooooooooooonger + (if and_ even + loooooooooooooooooooooooooooooooooooooooooooooooooooooooooonger then () else ()) @@ -164,12 +163,10 @@ let _ = xxxxxxxxx yyyyyyyyyy zzzzzzzzzzzz let _ = - if - (* foo *) - foo + if (* foo *) + foo then 0 - else if - (* bar *) - bar + else if (* bar *) + bar then 1 else 2