From 0d90afbd4b334eb1da93bf1c8783b653520b2dde Mon Sep 17 00:00:00 2001 From: Eisha Chen-yen-su Date: Mon, 30 Jul 2018 08:41:18 +0200 Subject: [PATCH] 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. --- fractal-gtk/src/widgets/message.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fractal-gtk/src/widgets/message.rs b/fractal-gtk/src/widgets/message.rs index a23f0efa..d61d036c 100644 --- a/fractal-gtk/src/widgets/message.rs +++ b/fractal-gtk/src/widgets/message.rs @@ -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)); }