From d3b1a8a7c58c1fa97c60c0e558a85c46c00a1d81 Mon Sep 17 00:00:00 2001 From: Sematre Date: Mon, 30 Dec 2024 21:22:27 +0100 Subject: [PATCH] Make `sender.name` optional as specified (#22) https://github.com/Sematre/typst-letter-pro/issues/21 Co-authored-by: Morwdan <5207513+Morwdan@users.noreply.github.com> --- src/lib.typ | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/lib.typ b/src/lib.typ index 95a735f..b18282e 100644 --- a/src/lib.typ +++ b/src/lib.typ @@ -534,10 +534,17 @@ ) // Configure page and text properties. - set document( - title: subject, - author: sender.name, - ) + if sender.name != none { + set document( + title: subject, + author: sender.name + ) + } + else { + set document( + title: subject, + ) + } set text(font: font, hyphenate: false)