Skip to content

Commit 97b821f

Browse files
committed
Updated style regular expression to not require digits
1 parent b0e5aab commit 97b821f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd2/ansi.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
allow_style = STYLE_TERMINAL
2424

2525
# Regular expression to match ANSI style sequences
26-
# This matches: colorama.ansi.CSI + digit(s) + m
27-
ANSI_STYLE_RE = re.compile(r'\033\[[0-9]+m')
26+
# This matches: colorama.ansi.CSI + 0 or more digits + m
27+
ANSI_STYLE_RE = re.compile(r'\033\[[0-9]*m')
2828

2929
# Foreground color presets
3030
FG_COLORS = {

0 commit comments

Comments
 (0)