From 555974a3af5829290dc4d647419f6a27c4a85f1d Mon Sep 17 00:00:00 2001 From: valentin gagarin Date: Wed, 13 Nov 2024 15:24:41 +0100 Subject: [PATCH] fix
rendering --- website/presentation/dom.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/website/presentation/dom.nix b/website/presentation/dom.nix index 9f271e77..81706fe2 100644 --- a/website/presentation/dom.nix +++ b/website/presentation/dom.nix @@ -536,7 +536,7 @@ let # setting to an attribute set will wrap the section in `
` hgroup.attrs = mkOption { type = with types; nullOr (submodule { options = global-attrs; }); - default = with lib; mkIf (!isNull config.before || !isNull config.after) { }; + default = with lib; if (config.before == [ ] && config.after == [ ]) then null else { }; }; # https://html.spec.whatwg.org/multipage/sections.html#the-hgroup-element before = mkOption { @@ -578,8 +578,10 @@ let ${heading} ${optionalString (!isNull self.heading.after) (toString-unwrap self.heading.after)} ''); - content = if isNull self.heading.hgroup.attrs then heading else hgroup - + join "\n" (map toString-unwrap self.content); + content = + (if isNull self.heading.hgroup.attrs then heading else hgroup) + + + join "\n" (map toString-unwrap self.content); in if !isNull self.attrs then print-element name self.attrs content