Skip to content

Bug: Extra empty line in sequences containing comments  #1019

@pascutto

Description

@pascutto

Hi !
When writing a sequence of instructions with interleaved comments, ocamlformat with profile conventional adds a extra line before the comment:

let () =
  print_string "Hello, world!";
  (* This is a comment *)
  print_newline ()

is formatted to

let () =
  print_string "Hello, world!";

  (* This is a comment *)
  print_newline ()

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions