From 60f8eda5c4a307a44c9ce32ec63ea6fbfd9ee506 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Fri, 30 Nov 2018 20:19:37 +0100 Subject: [PATCH] webconfig: Hack tmux's reset sequence This is quite ugly, but in lieu of putting in a proper ansi parser (i.e. the output part of a terminal), since this is the only such sequence we have seen until now, let's just match it. Fixes #5312. [ci skip] --- share/tools/web_config/webconfig.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/share/tools/web_config/webconfig.py b/share/tools/web_config/webconfig.py index 47555dec4..4d9642eda 100755 --- a/share/tools/web_config/webconfig.py +++ b/share/tools/web_config/webconfig.py @@ -308,8 +308,9 @@ def ansi_to_html(val): reg = re.compile(""" ( # Capture \x1b # Escape - [^m]+ # One or more non-'m's + [^m]* # Zero or more non-'m's m # Literal m terminates the sequence + \x0f? # HACK: A ctrl-o - this is how tmux' sgr0 ends ) # End capture """, re.VERBOSE) separated = reg.split(val)