web: allow plaintext emails to wrap

This commit is contained in:
Bill Thiede 2025-02-06 08:16:53 -08:00
parent 11c76332f3
commit 971e1049c7
2 changed files with 3 additions and 3 deletions

View File

@ -223,7 +223,7 @@ pub async fn thread(
}
format!(
r#"<p class="view-part-text-plain font-mono whitespace-pre">{}</p>"#,
r#"<p class="view-part-text-plain font-mono whitespace-pre-line">{}</p>"#,
// 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#"<p class="view-part-text-plain font-mono whitespace-pre">{}</p>"#,
r#"<p class="view-part-text-plain font-mono whitespace-pre-line">{}</p>"#,
// 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.

View File

@ -377,7 +377,7 @@ fn raw_text_message(contents: &str) -> Node<Msg> {
(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,
]