Fix markdown parsing failing if delimiter was last character

This commit is contained in:
Lonami Exo 2017-10-28 19:17:18 +02:00
parent 5adec2e1ab
commit 9600a9ea0b

View File

@ -84,8 +84,10 @@ def parse(message, delimiters=None):
current = Mode.NONE
break
if i < len(message):
offset += emojiness(message[i])
i += 1
if result and not isinstance(result[-1], tuple):
result.pop()
return message, result