Skip to content

Commit c60e02c

Browse files
committed
fix: incorrect starts_with_ansi check for forced coloring
1 parent 5d567c1 commit c60e02c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

diff-so-fancy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ my $line_count = 0;
121121
while (my $line = <STDIN>) {
122122
# If the very first line of the diff doesn't start with ANSI color we're assuming
123123
# it's a raw patch file, and we have to color the added/removed lines ourself
124-
if (!$color_forced && $line_count == 0 && starts_with_ansi($line)) {
124+
if (!$color_forced && $line_count == 0 && !starts_with_ansi($line)) {
125125
$manually_color_lines = 1;
126126
}
127127

0 commit comments

Comments
 (0)