about summary refs log tree commit homepage
path: root/lib/PublicInbox/View.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/PublicInbox/View.pm')
-rw-r--r--lib/PublicInbox/View.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index 47a2046e..35e171b0 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -568,7 +568,9 @@ sub add_text_body {
         # always support diff-highlighting, but we can't linkify hunk
         # headers for solver unless some coderepo are configured:
         my $diff;
-        if ($s =~ /^(?:diff|---|\+{3}) /ms) {
+        if ($s =~ /^([ \t]*)(?:diff|---|\+{3}) /ms) {
+                $ctx->{-dpfx} = $1 if $1; # for format-patch --interdiff output
+
                 # diffstat anchors do not link across attachments or messages:
                 $idx[0] = $upfx . $idx[0] if $upfx ne '';
                 $ctx->{-apfx} = join('/', @idx);