summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Cox <me@jasoncarloscox.com>2024-01-23 10:57:32 -0500
committerRobin Jarry <robin@jarry.cc>2024-01-25 21:55:27 +0100
commit21f38698bd58b796e53ed5e9f8f11925f48331b3 (patch)
tree9bb0e51b925734d29841402595ac379dd6926733
parent0e592b28802fe7d972dac2b4958284b9eaf274a0 (diff)
downloadaerc-21f38698bd58b796e53ed5e9f8f11925f48331b3.tar.gz
aerc-21f38698bd58b796e53ed5e9f8f11925f48331b3.zip
templates: avoid blank lines with empty signature
An empty line is desirable before the signature but shouldn't be added if there isn't actually a signature. Fixes: b76bf1b ("templates: move signature from compose to templates") Signed-off-by: Jason Cox <me@jasoncarloscox.com> Acked-by: Moritz Poldrack <moritz@poldrack.dev> Acked-by: Robin Jarry <robin@jarry.cc>
-rw-r--r--templates/forward_as_body4
-rw-r--r--templates/new_message4
-rw-r--r--templates/quoted_reply4
3 files changed, 9 insertions, 3 deletions
diff --git a/templates/forward_as_body b/templates/forward_as_body
index b29c3976..5155fab2 100644
--- a/templates/forward_as_body
+++ b/templates/forward_as_body
@@ -2,5 +2,7 @@ X-Mailer: aerc {{version}}
Forwarded message from {{(index .OriginalFrom 0).Name}} on {{dateFormat .OriginalDate "Mon Jan 2, 2006 at 3:04 PM"}}:
{{.OriginalText}}
+{{- with .Signature }}
-{{.Signature}}
+{{.}}
+{{- end }}
diff --git a/templates/new_message b/templates/new_message
index 34f80bc0..270f6d44 100644
--- a/templates/new_message
+++ b/templates/new_message
@@ -1,3 +1,5 @@
X-Mailer: aerc {{version}}
+{{- with .Signature }}
-{{.Signature}}
+{{.}}
+{{- end }}
diff --git a/templates/quoted_reply b/templates/quoted_reply
index 147a4fa5..c08a44d8 100644
--- a/templates/quoted_reply
+++ b/templates/quoted_reply
@@ -2,5 +2,7 @@ X-Mailer: aerc {{version}}
On {{dateFormat (.OriginalDate | toLocal) "Mon Jan 2, 2006 at 3:04 PM MST"}}, {{(index .OriginalFrom 0).Name}} wrote:
{{trimSignature .OriginalText | quote}}
+{{- with .Signature }}
-{{.Signature}}
+{{.}}
+{{- end }}