diff --git a/lib/pinc_format/Formatter.ml b/lib/pinc_format/Formatter.ml
index c85002d..b3e9a9d 100644
--- a/lib/pinc_format/Formatter.ml
+++ b/lib/pinc_format/Formatter.ml
@@ -586,7 +586,7 @@ and format_declarations declarations =
|> List.map (fun (key, declaration) -> format_declaration key declaration)
in
- separate (hardline ^^ hardline) declarations
+ separate (twice hardline) declarations ^^ hardline
;;
let format (declarations : Pinc_Parser.parsetree) : string =
diff --git a/test/array/run.t b/test/array/run.t
index cc1577c..9a3264d 100644
--- a/test/array/run.t
+++ b/test/array/run.t
@@ -133,3 +133,4 @@
{[1, 1, 2, 3, 4, 3, 4, 7] |> Array.unique}
}
+
diff --git a/test/char/run.t b/test/char/run.t
index 819dd40..03ec6d5 100644
--- a/test/char/run.t
+++ b/test/char/run.t
@@ -50,3 +50,4 @@
{'\033' + 128512}
}
+
diff --git a/test/component/run.t b/test/component/run.t
index 9f93497..e3ad1db 100644
--- a/test/component/run.t
+++ b/test/component/run.t
@@ -55,6 +55,7 @@
{test}
} + diff --git a/test/format/run.t b/test/format/run.t index 29e1465..7f1883a 100644 --- a/test/format/run.t +++ b/test/format/run.t @@ -120,3 +120,4 @@ print_d(): {print_d()} } + diff --git a/test/function/run.t b/test/function/run.t index ec75250..5a86442 100644 --- a/test/function/run.t +++ b/test/function/run.t @@ -98,6 +98,7 @@ {1...10 |> map(fn (item) -> item ** 2)} } + $ pincfmt ./library.pi library Math { @@ -123,3 +124,4 @@ library Math__Constants { let pi = 3.1415; } + diff --git a/test/loop/run.t b/test/loop/run.t index 7ac15e0..2fb93f0 100644 --- a/test/loop/run.t +++ b/test/loop/run.t @@ -218,3 +218,4 @@ } + diff --git a/test/mutation/run.t b/test/mutation/run.t index 2b40cae..a5db355 100644 --- a/test/mutation/run.t +++ b/test/mutation/run.t @@ -32,3 +32,4 @@ print_d(): {print_d()} } + diff --git a/test/operators/run.t b/test/operators/run.t index 8331033..0e8e5a4 100644 --- a/test/operators/run.t +++ b/test/operators/run.t @@ -154,3 +154,4 @@ (5 * 3) + 2 / 6 + 4 * 8 ** 10 = {(5 * 3) + 2 / 6 + 4 * 8 ** 10} } + diff --git a/test/optional_record_tags/run.t b/test/optional_record_tags/run.t index 1925a07..da8b0d6 100644 --- a/test/optional_record_tags/run.t +++ b/test/optional_record_tags/run.t @@ -26,3 +26,4 @@{text}
} + diff --git a/test/record/run.t b/test/record/run.t index 85d847f..71d76e6 100644 --- a/test/record/run.t +++ b/test/record/run.t @@ -53,3 +53,4 @@ }} } + diff --git a/test/slot/run.t b/test/slot/run.t index 1b5881d..c43d187 100644 --- a/test/slot/run.t +++ b/test/slot/run.t @@ -84,6 +84,7 @@