Optimize color stripping function a bit
This commit is contained in:
parent
5329d7503e
commit
ef78287a70
@ -103,7 +103,11 @@ debug_level_log = DebugLevel ("LOG")
|
||||
_escape = re.compile ("\x1b\\[[0-9;]*m")
|
||||
def strip_escape (s):
|
||||
|
||||
return _escape.sub ("", s)
|
||||
# FIXME: This can be optimized further!
|
||||
|
||||
while "\x1b" in s:
|
||||
s = _escape.sub ("", s)
|
||||
return s
|
||||
|
||||
def default_log_line_regex_ ():
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user