NixOS/nixfmt

empty line is not formatted

Closed this issue · 2 comments

Description

When there is empty lines the output is different.

Small example input

{
  adcasdcasd =

    "ascarvefdvadfv";
}

Expected output

{ adcasdcasd = "ascarvefdvadfv"; }

Actual output

{
  adcasdcasd =

    "ascarvefdvadfv";
}

This is working as expected according to the standard:

Single empty lines must be preserved, and consecutive empty lines must be collapsed into a single empty line.
This allows the formatter to expand or compact multi-line expressions, while still allowing grouping of code.

OK, thanks!