This small PR fixes the fact that, in OCaml blocks, in .mli files, the indentation was erased to a "only 2 space relative to the opening bracket" indentation.
For instance,
(**
{[
match None with
| None -> ()
| Some a -> match a with
| None -> ()
| Some _ -> ()
]}
*)
was turned into
(**
{[
match None with
| None -> ()
| Some a -> match a with
| None -> ()
| Some _ -> ()
]}
*)
which is not ideal.
The first commit adds a test, showing the wrong behaviour,. The second commit is the patch and updates the test.
The new behaviour is the first line is indented two spaces after the opening bracket, and for other lines the indentation relative to the first one is kept, as long as they are at least as indented as the first one. In the previous example, the exact indententation would be kept.
In the test, I also added that multilines in .mli files for toplevel block does not work!
This small PR fixes the fact that, in OCaml blocks, in .mli files, the indentation was erased to a "only 2 space relative to the opening bracket" indentation.
For instance,
was turned into
which is not ideal.
The first commit adds a test, showing the wrong behaviour,. The second commit is the patch and updates the test. The new behaviour is the first line is indented two spaces after the opening bracket, and for other lines the indentation relative to the first one is kept, as long as they are at least as indented as the first one. In the previous example, the exact indententation would be kept.
In the test, I also added that multilines in .mli files for toplevel block does not work!