From 4c5af0845c6a48bc059c02894f0fcf4b10ef0733 Mon Sep 17 00:00:00 2001 From: jesopo Date: Wed, 16 Jan 2019 12:42:45 +0000 Subject: [PATCH] output of `len()` needs to have a `-1` on it when matching it against indexes within the given string (src/utils/irc.py) --- src/utils/irc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/irc.py b/src/utils/irc.py index 25c170dd..f344d6f2 100644 --- a/src/utils/irc.py +++ b/src/utils/irc.py @@ -161,7 +161,7 @@ def _format_tokens(s: str) -> typing.List[str]: matches = [] # type: typing.List[str] for i, char in enumerate(s): - last_char = i == len(s) + last_char = i == len(s)-1 if is_color: can_add = False current_color = background if is_background else foreground