From 7de8e3fa824658e9fbf6967e497280df6347538a Mon Sep 17 00:00:00 2001 From: Griatch Date: Sun, 14 Oct 2012 20:49:26 +0200 Subject: [PATCH] Ansi fix - changed so one needs \\ to escape mux-style colour codes instead of just \. The extended { syntax is now escaped by adding an extra { in front - combining the two should enable getting around most needs of colouring backslashes. Resolves Issue 286. --- src/utils/ansi.py | 95 ++++++++++++++++++++++++----------------------- 1 file changed, 48 insertions(+), 47 deletions(-) diff --git a/src/utils/ansi.py b/src/utils/ansi.py index 511f6d6d9..b3bde1265 100644 --- a/src/utils/ansi.py +++ b/src/utils/ansi.py @@ -62,7 +62,8 @@ class ANSIParser(object): to ANSI command sequences We also allow to escape colour codes - by prepending with a \. + by prepending with a \ for mux-style and xterm256, + an extra { for Merc-style codes """ def __init__(self): @@ -71,29 +72,29 @@ class ANSIParser(object): # MUX-style mappings %cr %cn etc self.mux_ansi_map = [ - (r'(?