about summary refs log tree commit homepage
path: root/lib/PublicInbox/ViewDiff.pm
diff options
context:
space:
mode:
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> @@);