about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-05-31 16:46:04 +0000
committerEric Wong <e@80x24.org>2019-05-31 16:47:00 +0000
commit209e8ae75919762654e2ffc30aa2d7e86ec535f0 (patch)
tree3fb18ca46eb2e4dd4b86729dfa62fac85a6cd703 /lib
parentde4b593431f34785a8fed61eaf6a1cb1b9999995 (diff)
downloadpublic-inbox-209e8ae75919762654e2ffc30aa2d7e86ec535f0.tar.gz
This is worth a 1-2% speedup in t/perf-msgview.t rendering 2620
messages currently in https://public-inbox.org/meta/
Diffstat (limited to 'lib')
-rw-r--r--lib/PublicInbox/ViewDiff.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/PublicInbox/ViewDiff.pm b/lib/PublicInbox/ViewDiff.pm
index 6b8d9437..411ed2bb 100644
--- a/lib/PublicInbox/ViewDiff.pm
+++ b/lib/PublicInbox/ViewDiff.pm
@@ -159,7 +159,7 @@ sub flush_diff ($$$) {
                         $state == DSTATE_INIT or
                                 to_state($dst, $state, DSTATE_INIT);
                         $$dst .= $s;
-                } elsif ($s =~ m!^diff --git ($PATH_A) ($PATH_B)$!) {
+                } elsif ($s =~ m!^diff --git ($PATH_A) ($PATH_B)$!o) {
                         my ($pa, $pb) = ($1, $2);
                         if ($state != DSTATE_HEAD) {
                                 to_state($dst, $state, DSTATE_HEAD);
@@ -194,8 +194,8 @@ sub flush_diff ($$$) {
                         $$dst .= '</span>';
                         $state = DSTATE_CTX;
                         $$dst .= to_html($linkify, $s);
-                } elsif ($s =~ m!^--- (?:$PATH_A)! ||
-                         $s =~ m!^\+{3} (?:$PATH_B)!)  {
+                } elsif ($s =~ m!^--- (?:$PATH_A)!o ||
+                         $s =~ m!^\+{3} (?:$PATH_B)!o)  {
                         # color only (no oid link) if missing dctx->{oid_*}
                         $state <= DSTATE_STAT and
                                 to_state($dst, $state, DSTATE_HEAD);