Skip to content

Commit 384ec32

Browse files
committed
fix: starts_with_ansi always returned 1
1 parent c60e02c commit 384ec32

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

diff-so-fancy

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -993,7 +993,8 @@ sub is_numeric {
993993
sub starts_with_ansi {
994994
my $str = shift();
995995

996-
if ($str =~ /^$ansi_color_regex/) {
996+
# NOTE: This is not `ansi_color_regex`, which includes "no ANSI sequences".
997+
if ($str =~ /^$ansi_regex/) {
997998
return 1;
998999
} else {
9991000
return 0;

0 commit comments

Comments
 (0)