mirror of
https://github.com/chatmail/core.git
synced 2026-05-04 13:56: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:
@@ -1085,10 +1085,15 @@ impl<'a> MimeFactory<'a> {
|
||||
}
|
||||
};
|
||||
|
||||
let quoted_text = self
|
||||
let mut quoted_text = self
|
||||
.msg
|
||||
.quoted_text()
|
||||
.map(|quote| format_flowed_quote("e) + "\r\n\r\n");
|
||||
if quoted_text.is_none() && final_text.starts_with('>') {
|
||||
// Insert empty line to avoid receiver treating user-sent quote as topquote inserted by
|
||||
// Delta Chat.
|
||||
quoted_text = Some("\r\n".to_string());
|
||||
}
|
||||
let flowed_text = format_flowed(final_text);
|
||||
|
||||
let footer = &self.selfstatus;
|
||||
|
||||
Reference in New Issue
Block a user