Skip to content

Commit

Permalink
Code alignment for readability
Browse files Browse the repository at this point in the history
  • Loading branch information
scottchiefbaker committed Jun 9, 2023
1 parent e928a18 commit c9df4a5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions diff-so-fancy
Original file line number Diff line number Diff line change
Expand Up @@ -937,8 +937,8 @@ sub git_ansi_color {
my $fg = $parts[0] // "";
my $bg = $parts[1] // "";

set_ansi_color( $fg, 0, \@ansi_part, $colors ) if $fg;
set_ansi_color( $bg, 10, \@ansi_part, $colors ) if $bg;
set_ansi_color($fg, 0 , \@ansi_part, $colors) if $fg;
set_ansi_color($bg, 10, \@ansi_part, $colors) if $bg;

#############################################

Expand All @@ -950,9 +950,10 @@ sub git_ansi_color {

sub set_ansi_color {
my ($color, $increment, $ansi_part, $colors) = @_;
my $base_code = 30 + $increment;

my $base_code = 30 + $increment;
my $base8_code = 38 + $increment;
my $ext_code = 82 + $increment;
my $ext_code = 82 + $increment;

if (is_numeric($color)) {
if ($color < 8) {
Expand Down

0 comments on commit c9df4a5

Please sign in to comment.