strip colors like \x1b[38;5;148m

pull/933/head
lonnywong 5 years ago committed by Disconnect3d
parent aefcde5b3c
commit 5517792bd3

@ -74,7 +74,7 @@ def generateColorFunction(config):
return function return function
def strip(x): def strip(x):
return re.sub('\x1b\\[\d+m', '', x) return re.sub('\x1b\\[[\d;]+m', '', x)
def terminateWith(x, color): def terminateWith(x, color):
return re.sub('\x1b\\[0m', NORMAL + color, x) return re.sub('\x1b\\[0m', NORMAL + color, x)

Loading…
Cancel
Save