diff options
author | Eric Wong <e@80x24.org> | 2019-02-04 11:40:13 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2019-02-04 11:42:47 +0000 |
commit | 3a2f21e2cb2e054be70505fae522a71627391610 (patch) | |
tree | 943bcaeba2a7cf404afd30780f90ce5625e7b751 /lib/PublicInbox/ViewDiff.pm | |
parent | 98661e7894ae4b516d7b7a9d87e451ef2bfe57ba (diff) | |
download | public-inbox-3a2f21e2cb2e054be70505fae522a71627391610.tar.gz |
Leaving out parentheses caused transitions to state="del" or state="add" to be misidentified. cf. https://public-inbox.org/meta/20190204105454.GG10587@szeder.dev/ Reported-by: SZEDER Gábor <szeder.dev@gmail.com>
Diffstat (limited to 'lib/PublicInbox/ViewDiff.pm')
-rw-r--r-- | lib/PublicInbox/ViewDiff.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/ViewDiff.pm b/lib/PublicInbox/ViewDiff.pm index c818203b..a773e385 100644 --- a/lib/PublicInbox/ViewDiff.pm +++ b/lib/PublicInbox/ViewDiff.pm @@ -190,8 +190,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)! || + $s =~ m!^\+{3} (?:$PATH_B)!) { # color only (no oid link) if missing dctx->{oid_*} $state <= DSTATE_STAT and to_state($dst, $state, DSTATE_HEAD); |