chore(mail): fix html meta head, 2nd attempt

This commit is contained in:
Steffen Jost 2022-12-21 16:38:59 +01:00
parent 473cc57727
commit fca52aa7e6

View File

@ -202,10 +202,13 @@ addHtmlMarkdownAlternatives' fn html' = do
--let html_meta = H.head $ H.preEscapedText "<meta charset=\"utf-8\">" -- this is probably not the correct way to do this --let html_meta = H.head $ H.preEscapedText "<meta charset=\"utf-8\">" -- this is probably not the correct way to do this
let html_meta = [shamlet| let html_meta = [shamlet|
$doctype 5 $doctype 5
<head> <html>
<meta charset="utf-8"> <head>
<meta charset="utf-8">
<body>
^{html}
|] |]
providePreferredAlternative $ NamedMailPart { disposition = InlineDisposition $ fn <> ".html", namedPart = html_meta <> html } providePreferredAlternative $ NamedMailPart { disposition = InlineDisposition $ fn <> ".html", namedPart = html_meta }
whenIsJust markdown $ provideAlternative . NamedMailPart (InlineDisposition (fn <> ".txt")) whenIsJust markdown $ provideAlternative . NamedMailPart (InlineDisposition (fn <> ".txt"))
where where
writerOptions = markdownWriterOptions writerOptions = markdownWriterOptions