about summary refs log tree commit homepage
path: root/lib/PublicInbox/ViewDiff.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-06-04 08:30:55 +0000
committerEric Wong <e@80x24.org>2019-06-04 10:06:18 +0000
commitbbfa42a9ea55b7057c7a6b632f090763c9e7c655 (patch)
tree241795973e799c5b54e04e3d7f20a9e2948fea6b /lib/PublicInbox/ViewDiff.pm
parentb5693a2107a1edd02cfad73f9302833e1b91d339 (diff)
downloadpublic-inbox-bbfa42a9ea55b7057c7a6b632f090763c9e7c655.tar.gz
git would not generate non-ASCII digits to describe
hunk offsets, so don't waste more time than necessary
to make sense of non-ASCII digit chars for line offsets.
Diffstat (limited to 'lib/PublicInbox/ViewDiff.pm')
-rw-r--r--lib/PublicInbox/ViewDiff.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/ViewDiff.pm b/lib/PublicInbox/ViewDiff.pm
index 411ed2bb..b7dab819 100644
--- a/lib/PublicInbox/ViewDiff.pm
+++ b/lib/PublicInbox/ViewDiff.pm
@@ -55,12 +55,12 @@ sub diff_hunk ($$$$) {
         (defined($spfx) && defined($oid_a) && defined($oid_b)) or
                 return "@@ $ca $cb @@";
 
-        my ($n) = ($ca =~ /^-(\d+)/);
+        my ($n) = ($ca =~ /^-([0-9]+)/);
         $n = defined($n) ? do { ++$n; "#n$n" } : '';
 
         my $rv = qq(@@ <a\nhref="$spfx$oid_a/s/$dctx->{Q}$n">$ca</a>);
 
-        ($n) = ($cb =~ /^\+(\d+)/);
+        ($n) = ($cb =~ /^\+([0-9]+)/);
         $n = defined($n) ? do { ++$n; "#n$n" } : '';
 
         $rv .= qq( <a\nhref="$spfx$oid_b/s/$dctx->{Q}$n">$cb</a> @@);