From 97b821f10913c82843c2278c70805e3d39cd2076 Mon Sep 17 00:00:00 2001 From: Kevin Van Brunt Date: Thu, 19 Dec 2019 17:31:50 -0500 Subject: Updated style regular expression to not require digits --- cmd2/ansi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cmd2') diff --git a/cmd2/ansi.py b/cmd2/ansi.py index b5b78164..c80d3371 100644 --- a/cmd2/ansi.py +++ b/cmd2/ansi.py @@ -23,8 +23,8 @@ STYLE_ALWAYS = 'Always' allow_style = STYLE_TERMINAL # Regular expression to match ANSI style sequences -# This matches: colorama.ansi.CSI + digit(s) + m -ANSI_STYLE_RE = re.compile(r'\033\[[0-9]+m') +# This matches: colorama.ansi.CSI + 0 or more digits + m +ANSI_STYLE_RE = re.compile(r'\033\[[0-9]*m') # Foreground color presets FG_COLORS = { -- cgit v1.2.1