diff --git a/lib/Params.ml b/lib/Params.ml index 62698e9077..d428c29ff8 100644 --- a/lib/Params.ml +++ b/lib/Params.ml @@ -598,9 +598,7 @@ 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_or (Option.is_some fmt_extension_suffix) "@ " " " - $ fmt_cond xcnd ) + $ fmt_attributes $ fmt "@ " $ 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 c3a401fa21..9e06336d81 100644 --- a/test/passing/tests/ite-kw_first.ml.ref +++ b/test/passing/tests/ite-kw_first.ml.ref @@ -45,8 +45,9 @@ f ;; f - ( if and_ even - loooooooooooooooooooooooooooooooooooooooooooooooooooooooooonger + ( if + and_ even + loooooooooooooooooooooooooooooooooooooooooooooooooooooooooonger then () else () ) @@ -164,10 +165,12 @@ 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 422cec07b1..64d1228d79 100644 --- a/test/passing/tests/ite-kw_first_closing.ml.ref +++ b/test/passing/tests/ite-kw_first_closing.ml.ref @@ -52,8 +52,9 @@ f ;; f - ( if and_ even - loooooooooooooooooooooooooooooooooooooooooooooooooooooooooonger + ( if + and_ even + loooooooooooooooooooooooooooooooooooooooooooooooooooooooooonger then () else () ) @@ -179,10 +180,12 @@ 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 d0b1ce402b..ba802a60a0 100644 --- a/test/passing/tests/ite-kw_first_no_indicate.ml.ref +++ b/test/passing/tests/ite-kw_first_no_indicate.ml.ref @@ -45,8 +45,9 @@ f ;; f - (if and_ even - loooooooooooooooooooooooooooooooooooooooooooooooooooooooooonger + (if + and_ even + loooooooooooooooooooooooooooooooooooooooooooooooooooooooooonger then () else ()) @@ -163,10 +164,12 @@ 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