Merge 7c8bf29df3
into 6d3b6dc922
This commit is contained in:
commit
4986092ba0
|
@ -111,10 +111,8 @@
|
|||
in "${name} ${concatStringsSep " " flatElements}";
|
||||
|
||||
# String -> ListOf Anything -> String
|
||||
convertListOfNonFlatAttrsToKDL = name: list: ''
|
||||
${name} {
|
||||
${indentStrings (map (x: convertAttributeToKDL "-" x) list)}
|
||||
}'';
|
||||
convertListOfNonFlatAttrsToKDL = name: list:
|
||||
"${concatStringsSep "\n" (map (x: convertAttributeToKDL name x) list)}";
|
||||
|
||||
# String -> ListOf Anything -> String
|
||||
convertListToKDL = name: list:
|
||||
|
|
|
@ -27,15 +27,11 @@ listInAttrsInList {
|
|||
}
|
||||
}
|
||||
list2 {
|
||||
- {
|
||||
a 8
|
||||
}
|
||||
a 8
|
||||
}
|
||||
}
|
||||
nested {
|
||||
- 1 2
|
||||
- true false
|
||||
-
|
||||
- null
|
||||
}
|
||||
repeated 1 2
|
||||
repeated true false
|
||||
repeated
|
||||
repeated null
|
||||
unsafeString " \" \n "
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
''
|
||||
null
|
||||
];
|
||||
nested = [ [ 1 2 ] [ true false ] [ ] [ null ] ];
|
||||
repeated = [ [ 1 2 ] [ true false ] [ ] [ null ] ];
|
||||
extraAttrs = {
|
||||
_args = [ 2 true ];
|
||||
_props = {
|
||||
|
@ -33,12 +33,12 @@
|
|||
};
|
||||
};
|
||||
listInAttrsInList = {
|
||||
list1 = [
|
||||
list1."-" = [
|
||||
{ a = 1; }
|
||||
{ b = true; }
|
||||
{
|
||||
c = null;
|
||||
d = [{ e = "asdfadfasdfasdf"; }];
|
||||
d."-" = [{ e = "asdfadfasdfasdf"; }];
|
||||
}
|
||||
];
|
||||
list2 = [{ a = 8; }];
|
||||
|
|
Loading…
Reference in New Issue