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 @@ } + $ pincfmt ./Matrix.pi component Matrix { @@ -70,6 +71,7 @@ }} } + $ pincfmt ./Sub/SubComponent.pi component HeadlineSecondary { @@ -107,3 +109,4 @@ "INVALID TAG!" } } + diff --git a/test/context/run.t b/test/context/run.t index 6b48108..2d21040 100644 --- a/test/context/run.t +++ b/test/context/run.t @@ -22,6 +22,7 @@ } + $ pincfmt ./HeadlineSecondary.pi component HeadlineSecondary { @@ -58,6 +59,7 @@ "INVALID TAG!" } } + $ pincfmt ./SubComponent.pi component SubComponent { @@ -71,3 +73,4 @@

{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 @@
"{attributes.bar}" & "{attributes.lorem}"
} + diff --git a/test/portal/run.t b/test/portal/run.t index 9b2f6ae..be685dc 100644 --- a/test/portal/run.t +++ b/test/portal/run.t @@ -47,3 +47,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 @@
Hello Default
} + $ pincfmt ./SlotProvider.pi component SlotProvider { @@ -106,6 +107,7 @@ {slot_nothing} } + $ pincfmt ./SubComponent.pi component SubComponent { @@ -145,3 +147,4 @@ {shouter} } + diff --git a/test/store/run.t b/test/store/run.t index 7e025fa..fed90c9 100644 --- a/test/store/run.t +++ b/test/store/run.t @@ -28,6 +28,7 @@ title: #String, code: #Int :: fn (v) -> v * 2, } + $ pincfmt ./StoreValueProvider.pi component StoreValueProvider { @@ -69,3 +70,4 @@ {products} } + diff --git a/test/template/run.t b/test/template/run.t index 6ab8758..28dc2aa 100644 --- a/test/template/run.t +++ b/test/template/run.t @@ -72,3 +72,4 @@ } + diff --git a/test/test/run.t b/test/test/run.t index 24fe288..c0a726d 100644 --- a/test/test/run.t +++ b/test/test/run.t @@ -33,3 +33,4 @@

} +