Fixed unColor to be right.

This commit is contained in:
Jeremy Fincher 2003-09-04 17:32:27 +00:00
parent fff4a7d864
commit 64459c93ec

View File

@ -266,7 +266,8 @@ def canonicalColor(s, bg=False, shift=0):
else:
return (fg, None)
_unColorRe = re.compile('(\x0F|\x03(?:\\d+|\\d+,\\d+)?)')
_unColorRe = re.compile('\x0F|(?:\x03(?:\\d+|\\d+,\\d+)?)')
_unColorRe = re.compile('(?:\x03\\d{1,2},\\d{1,2})|\x03\\d{1,2}|\x03|\x0F')
def unColor(s):
return _unColorRe.sub('', s)