Skip to content

Commit

Permalink
upgrade diff-so-fancy deps
Browse files Browse the repository at this point in the history
  • Loading branch information
techgaun committed Oct 27, 2020
1 parent 981171f commit 65426ac
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 358 deletions.
20 changes: 11 additions & 9 deletions scripts/DiffHighlight.pm
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,19 @@ my $NULL = File::Spec->devnull();

# Highlight by reversing foreground and background. You could do
# other things like bold or underline if you prefer.
my @OLD_HIGHLIGHT = (
color_config('color.diff-highlight.oldnormal'),
color_config('color.diff-highlight.oldhighlight', "\x1b[7m"),
color_config('color.diff-highlight.oldreset', "\x1b[27m")
our @OLD_HIGHLIGHT = (
color_config('color.diff-highlight.oldnormal', "\e[1;31m"),
color_config('color.diff-highlight.oldhighlight', "\e[1;31;48;5;52m"),
"\x1b[27m",
);
my @NEW_HIGHLIGHT = (
color_config('color.diff-highlight.newnormal', $OLD_HIGHLIGHT[0]),
color_config('color.diff-highlight.newhighlight', $OLD_HIGHLIGHT[1]),
color_config('color.diff-highlight.newreset', $OLD_HIGHLIGHT[2])
our @NEW_HIGHLIGHT = (
color_config('color.diff-highlight.newnormal', "\e[1;32m"),
color_config('color.diff-highlight.newhighlight', "\e[1;32;48;5;22m"),
$OLD_HIGHLIGHT[2],
);



my $RESET = "\x1b[m";
my $COLOR = qr/\x1b\[[0-9;]*m/;
my $BORING = qr/$COLOR|\s/;
Expand Down Expand Up @@ -72,7 +74,7 @@ sub handle_line {
(?:$COLOR?\|$COLOR?[ ])* # zero or more trailing "|"
[ ]* # trailing whitespace for merges
/x) {
my $graph_prefix = $&;
my $graph_prefix = $&;

# We must flush before setting graph indent, since the
# new commit may be indented differently from what we
Expand Down
Loading

0 comments on commit 65426ac

Please sign in to comment.