move indent function to lib
This commit is contained in:
parent
7bc7cd49cf
commit
76d6c246e2
2 changed files with 2 additions and 1 deletions
|
|
@ -143,6 +143,8 @@ rec {
|
|||
else
|
||||
[];
|
||||
|
||||
indent = i: str: lib.concatMapStringsSep "\n" (x: (lib.strings.replicate i " ") + x) (lib.splitString "\n" str);
|
||||
|
||||
# Generator for XML
|
||||
formatXML = {
|
||||
enclosingRoot ? null
|
||||
|
|
|
|||
|
|
@ -94,7 +94,6 @@ let
|
|||
)
|
||||
+ (let
|
||||
script = extraScript args;
|
||||
indent = i: str: lib.concatMapStringsSep "\n" (x: (lib.strings.replicate i " ") + x) (lib.splitString "\n" script);
|
||||
in
|
||||
lib.optionalString (script != "") script)
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in a new issue