X-Git-Url: https://git.ctpug.org.za/?a=blobdiff_plain;f=naja%2Fwidgets%2Ftext.py;h=1cf15d0bcf4601c72d52eb81d871ecedf8b454ec;hb=8c08ffd9e2d674558bca43d4f709be5f49e46119;hp=c4ac45600ec398a5679656eb668dbb3c174d41ce;hpb=8e4b1a84e4370c19564541d822b074fcf22bdea9;p=naja.git diff --git a/naja/widgets/text.py b/naja/widgets/text.py index c4ac456..1cf15d0 100644 --- a/naja/widgets/text.py +++ b/naja/widgets/text.py @@ -173,6 +173,8 @@ class TextBoxWidget(TextWidget): suffix = word[-1] word = word[:-1] + if not word: + return None if word[0] == '{' and word[-1] == '}': subwords = word[1:-1].split(',') if all(subword in MARKUP_MAP for subword in subwords):