From 34460c10977a9a5cc3287d04ce594a71b7142886 Mon Sep 17 00:00:00 2001 From: jutty Date: Sat, 20 Dec 2025 21:28:42 -0300 Subject: [PATCH] Render configuration text only if non-empty --- src/types.rs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/types.rs b/src/types.rs index c9838b7..d66bfdf 100644 --- a/src/types.rs +++ b/src/types.rs @@ -161,9 +161,21 @@ impl Node { impl Config { #[must_use] pub fn parse_text(self) -> Config { + let footer_text = if self.footer_text.is_empty() { + self.footer_text + } else { + content::parse(&self.footer_text) + }; + + let about_text = if self.about_text.is_empty() { + self.about_text + } else { + content::parse(&self.about_text) + }; + Config { - footer_text: content::parse(&self.footer_text), - about_text: content::parse(&self.about_text), + footer_text, + about_text, ..self } }