dotfiles/.config/aerc/templates/forward_as_body

20 lines
500 B
Text

X-Mailer: aerc {{version}}
{{ if or
(eq .OriginalMIMEType "text/html")
(contains (toLower .OriginalText) "<html")
}}
{{- $text := exec `/usr/lib/aerc/filters/html` .OriginalText | replace `\r` `` -}}
{{- range split "\n" $text -}}
{{- if eq . "References:" }}{{break}}{{end}}
{{- if or
(eq (len .) 0)
(match `^\[.+\]\s*$` .)
}}{{continue}}{{end}}
{{- printf "%s\n" . | replace `^[\s]+` ""}}
{{- end -}}
{{- else }}
{{- trimSignature .OriginalText}}
{{- end -}}
{{.Signature -}}