-
Notifications
You must be signed in to change notification settings - Fork 208
Open
Labels
Description
Describe the bug
When a match expr with is one of the two branches of if true then ... else ... it gets formatted into 3 lines, this behaviour started in 0.28.1 and is not present under 0.27.0. I couldn't find any explanation, or PR related to this change, and it happens for very short lines, so I'm assuming it's a bug
How to Reproduce
Steps to reproduce the behavior:
Run ocamlformat 0.28.1 with the profile from https://github.com/xapi-project/xen-api/blob/57f657fd85771d901b18658c561f8a0d592f1f0b/.ocamlformat to format this file:
let name =
if true then
match expr with true -> () | false -> ()
else
match expr with true -> () | false -> ()
It produces:
let name =
if true then
match
expr
with
| true ->
()
| false ->
()
else
match
expr
with
| true ->
()
| false ->
()