mirror of
https://github.com/chatmail/core.git
synced 2026-04-22 16:06:30 +03:00
Format message lines starting with > as quotes
This makes quotes created by user display properly in other MUAs like Thunderbird and not start with space in MUAs that don't support format=flowed. To distinguish user-created quotes from top-quote inserted by Delta Chat, a newline is inserted if there is no top-quote and the first line starts with ">". Nested quotes are not supported, e.g. line starting with "> >" will start with ">" on the next line if wrapped.
This commit is contained in:
@@ -204,13 +204,11 @@ fn remove_top_quote<'a>(lines: &'a [&str]) -> (&'a [&'a str], Option<String>) {
|
||||
first_quoted_line = l;
|
||||
}
|
||||
last_quoted_line = Some(l)
|
||||
} else if !is_empty_line(line) {
|
||||
if is_quoted_headline(line) && !has_quoted_headline && last_quoted_line.is_none() {
|
||||
has_quoted_headline = true
|
||||
} else {
|
||||
/* non-quoting line found */
|
||||
break;
|
||||
}
|
||||
} else if is_quoted_headline(line) && !has_quoted_headline && last_quoted_line.is_none() {
|
||||
has_quoted_headline = true
|
||||
} else {
|
||||
/* non-quoting line found */
|
||||
break;
|
||||
}
|
||||
}
|
||||
if let Some(last_quoted_line) = last_quoted_line {
|
||||
|
||||
Reference in New Issue
Block a user