Skip to content

Commit f994629

Browse files
Trim excessive new lines
I am writing reverse records for IPv6 where you get two entries per screen because of the amount of new lines that get accumulated due to the heavy usage of subdomains.
1 parent ba28bdb commit f994629

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dns/types/zone.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
let
1111
inherit (builtins) filter removeAttrs;
1212
inherit (lib) concatMapStringsSep concatStringsSep mapAttrs
13-
mapAttrsToList optionalString;
13+
mapAttrsToList optionalString trim;
1414
inherit (lib) mkOption literalExample types;
1515

1616
inherit (import ./record.nix { inherit lib; }) recordType writeRecord;
@@ -55,7 +55,7 @@ let
5555
sub = concatStringsSep "\n\n" (mapAttrsToList writeSubzone' zone.subdomains);
5656
in
5757
concatStringsSep "\n\n" groups'
58-
+ optionalString (sub != "") ("\n\n" + sub);
58+
+ optionalString (sub != "") ("\n\n" + trim sub);
5959
zone = types.submodule ({ name, ... }: {
6060
options = {
6161
useOrigin = mkOption {

0 commit comments

Comments
 (0)