lib.xml.render-term: quote strings

This commit is contained in:
tv 2015-03-20 10:58:11 +01:00
parent 763a81ac08
commit 270ceb7676

View File

@ -68,12 +68,16 @@ rec {
bool = toJSON content; bool = toJSON content;
int = toJSON content; int = toJSON content;
list = concatMapStrings render content; list = concatMapStrings render content;
string = content; string = quote content;
}; };
in in
{ name, attrs, content }: { name, attrs, content }:
# XXX we're currently encoding too much information with `null`..
if name == null if name == null
then
if content == null
then "" then ""
else content
else let else let
attrs' = render-attrs attrs; attrs' = render-attrs attrs;
content' = render-content content; content' = render-content content;