Skip to content

Fix indentation after if .. then (* cmt *) begin#2785

Merged
Julow merged 1 commit intoocaml-ppx:mainfrom
Julow:ite-beginend-comment
Mar 17, 2026
Merged

Fix indentation after if .. then (* cmt *) begin#2785
Julow merged 1 commit intoocaml-ppx:mainfrom
Julow:ite-beginend-comment

Conversation

@Julow
Copy link
Copy Markdown
Collaborator

@Julow Julow commented Mar 17, 2026

This reduce the indentation of the begin keyword in this case:

 let () =
   if true then (* a *)
     begin
     ()
   end
   else ()

and fixes an instability issue when the comment was big enough.

This reduce the indentation of the `begin` keyword in this case:

     let () =
       if true then (* a *)
         begin
         ()
       end
       else ()

and fixes an instability issue when the comment was big enough.
@Julow Julow merged commit 7561197 into ocaml-ppx:main Mar 17, 2026
6 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant