about summary refs log tree commit homepage
path: root/lib/PublicInbox/ViewDiff.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-01-19 08:54:42 +0000
committerEric Wong <e@80x24.org>2019-01-20 04:24:54 +0000
commitf82593fc84a6773cd6fcb0633fdcca4cee92859f (patch)
tree74b696d1667cf36931b9e5c51ec0bf0f0671f242 /lib/PublicInbox/ViewDiff.pm
parent37aadb7c7913442d470c050170639b37301cd6bf (diff)
downloadpublic-inbox-f82593fc84a6773cd6fcb0633fdcca4cee92859f.tar.gz
As with our use of the trailing slash in $MESSAGE_ID/T/ and
'$MESSAGE_ID/t/' endpoints, this for 'wget -r --mirror'
compatibility as well as allowing sysadmins to quickly stand up
a static directory with "index.html" in it to reduce load.
Diffstat (limited to 'lib/PublicInbox/ViewDiff.pm')
-rw-r--r--lib/PublicInbox/ViewDiff.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/PublicInbox/ViewDiff.pm b/lib/PublicInbox/ViewDiff.pm
index 94f015f4..1aad2832 100644
--- a/lib/PublicInbox/ViewDiff.pm
+++ b/lib/PublicInbox/ViewDiff.pm
@@ -45,12 +45,12 @@ sub diff_hunk ($$$$) {
         my ($n) = ($ca =~ /^-(\d+)/);
         $n = defined($n) ? do { ++$n; "#n$n" } : '';
 
-        my $rv = qq(@@ <a\nhref=$spfx$oid_a/s$dctx->{Q}$n>$ca</a>);
+        my $rv = qq(@@ <a\nhref=$spfx$oid_a/s/$dctx->{Q}$n>$ca</a>);
 
         ($n) = ($cb =~ /^\+(\d+)/);
         $n = defined($n) ? do { ++$n; "#n$n" } : '';
 
-        $rv .= qq( <a\nhref=$spfx$oid_b/s$dctx->{Q}$n>$cb</a> @@);
+        $rv .= qq( <a\nhref=$spfx$oid_b/s/$dctx->{Q}$n>$cb</a> @@);
 }
 
 sub flush_diff ($$$$) {
@@ -90,11 +90,11 @@ sub flush_diff ($$$$) {
                         }
                         $$dst .= to_html($linkify, $s);
                 } elsif ($s =~ s/^(index $OID_NULL\.\.)($OID_BLOB)\b//o) {
-                        $$dst .= qq($1<a\nhref=$spfx$2/s$dctx->{Q}>$2</a>);
+                        $$dst .= qq($1<a\nhref=$spfx$2/s/$dctx->{Q}>$2</a>);
                         $$dst .= to_html($linkify, $s) ;
                 } elsif ($s =~ s/^index ($OID_NULL)(\.\.$OID_BLOB)\b//o) {
                         $$dst .= 'index ';
-                        $$dst .= qq(<a\nhref=$spfx$1/s$dctx->{Q}>$1</a>$2);
+                        $$dst .= qq(<a\nhref=$spfx$1/s/$dctx->{Q}>$1</a>$2);
                         $$dst .= to_html($linkify, $s);
                 } elsif ($s =~ /^index ($OID_BLOB)\.\.($OID_BLOB)/o) {
                         $dctx->{oid_a} = $1;