message.rs: Remove whitespaces around msg parts

This removes the leading and trailing whitespaces of each messages'
parts as we want a consistent spacing between the quotes and the rest
of the messages. Thus the spacing between a quote and a text separated
by many line returns and none will be the same.
This commit is contained in:
Eisha Chen-yen-su 2018-07-30 08:41:18 +02:00
parent 5e01895925
commit 0d90afbd4b

View file

@ -675,7 +675,7 @@ fn split_msg(body: &str) -> Vec<(String, MsgPartType)> {
let v: Vec<&str> = group
.map(|l| l.trim_left_matches(">").trim_left())
.collect();
let s = v.join("\n").to_string();
let s = v.join("\n").trim().to_string();
parts.push((s, k));
}