colors: Fix index out of range error for markdown style emph.

This commit is contained in:
poljar (Damir Jelić) 2018-03-12 19:53:27 +01:00
parent 0df199fd6f
commit c9d953dc4d

View file

@ -89,7 +89,12 @@ class Formatted():
i = i + 1
continue
elif i+1 > len(line) or line[i+1].isspace():
elif i+1 < len(line) and line[i+1].isspace():
text = text + line[i]
i = i + 1
continue
elif i == len(line) - 1:
text = text + line[i]
i = i + 1
continue