From 44e065d81802773cc00fc527746d4af59aa85c28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Mon, 20 Aug 2018 13:06:56 +0200 Subject: [PATCH] colors: Strip whitespace from both ends of the formatted string. --- matrix/colors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matrix/colors.py b/matrix/colors.py index 06c6485..e1a6eba 100644 --- a/matrix/colors.py +++ b/matrix/colors.py @@ -322,7 +322,7 @@ class Formatted(): return text weechat_strings = map(format_string, self.substrings) - return "".join(weechat_strings).rstrip("\n").replace("\n\n", "\n") + return "".join(weechat_strings).replace("\n\n", "\n").strip() # TODO this should be a typed dict.