fix the shlex fail. Colors are disabled on too long elements

parent f638427a
......@@ -439,9 +439,11 @@ class TextWin(Win):
try:
splitted = shlex.split(txt)
except ValueError:
from common import debug
debug('SHLEX FAILED on: [%s]\n' % (txt,))
splitted = 'shlex failed here. See debug'.split()
# FIXME colors are disabled on too long words
txt = txt.replace('"[', '').replace(']"', '')\
.replace('"{', '').replace('}"', '')\
.replace('"(', '').replace(')"', '')
splitted = txt.split()
for word in splitted:
if word in list(special_words.keys()):
self.addstr(word, curses.color_pair(special_words[word]))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment