colors: Strip whitespace from both ends of the formatted string.

This commit is contained in:
Damir Jelić 2018-08-20 13:06:56 +02:00
parent 1e016ad495
commit 44e065d818

View file

@ -322,7 +322,7 @@ class Formatted():
return text return text
weechat_strings = map(format_string, self.substrings) 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. # TODO this should be a typed dict.