From 971e1049c71cde253d655d72bf93d33b038adc71 Mon Sep 17 00:00:00 2001 From: Bill Thiede Date: Thu, 6 Feb 2025 08:16:53 -0800 Subject: [PATCH] web: allow plaintext emails to wrap --- server/src/nm.rs | 4 ++-- web/src/view/mod.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/src/nm.rs b/server/src/nm.rs index 5bc289a..737e6a0 100644 --- a/server/src/nm.rs +++ b/server/src/nm.rs @@ -223,7 +223,7 @@ pub async fn thread( } format!( - r#"

{}

"#, + r#"

{}

"#, // Trim newlines to prevent excessive white space at the beginning/end of // presenation. Leave tabs and spaces incase plain text attempts to center a // header on the first line. @@ -578,7 +578,7 @@ fn flatten_body_parts(parts: &[Body]) -> Body { .map(|p| match p { Body::PlainText(PlainText { text, .. }) => { format!( - r#"

{}

"#, + r#"

{}

"#, // Trim newlines to prevent excessive white space at the beginning/end of // presenation. Leave tabs and spaces incase plain text attempts to center a // header on the first line. diff --git a/web/src/view/mod.rs b/web/src/view/mod.rs index 70deb36..2fdc4d1 100644 --- a/web/src/view/mod.rs +++ b/web/src/view/mod.rs @@ -377,7 +377,7 @@ fn raw_text_message(contents: &str) -> Node { (contents, None) }; div![ - C!["view-part-text-plain", "font-mono", "whitespace-pre"], + C!["view-part-text-plain", "font-mono", "whitespace-pre-line"], contents, truncated_msg, ]