[Bps-public-commit] App-Changeloggr branch, master, updated. 565dbed93cd76e349c8010c68c410cf6e46c354c
sartak at bestpractical.com
sartak at bestpractical.com
Wed Aug 5 00:26:35 EDT 2009
The branch, master has been updated
via 565dbed93cd76e349c8010c68c410cf6e46c354c (commit)
from af4cf11c810af5d8e1e4bc2696cb9c3c67306ddd (commit)
Summary of changes:
lib/App/Changeloggr/View.pm | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
- Log -----------------------------------------------------------------
commit 565dbed93cd76e349c8010c68c410cf6e46c354c
Author: Shawn M Moore <sartak at gmail.com>
Date: Wed Aug 5 00:26:27 2009 -0400
Color the + and - in the diffstat description
diff --git a/lib/App/Changeloggr/View.pm b/lib/App/Changeloggr/View.pm
index d76e7bf..44d57a6 100644
--- a/lib/App/Changeloggr/View.pm
+++ b/lib/App/Changeloggr/View.pm
@@ -259,9 +259,13 @@ template '/change/more' => sub {
for (['+', 'diffadd'], ['-', 'diffsub']) {
my ($char, $class) = @$_;
+ my $quoted_char = quotemeta $char;
+
# this regex avoids coloring the symbols in filenames
- $diffstat =~ s{(\|\s+\d+ |</span>)(\Q$char\E+)}
+ $diffstat =~ s{(\|\s+\d+ |</span>)($quoted_char+)}
{$1<span class="$class">$2</span>}g;
+ $diffstat =~ s{((?:insertion|deletion)s?(?:(|\())($quoted_char)()|\))}
+ {$1<span class="$class">$2</span>$3}g;
}
outs_raw $diffstat;
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list