From 8fe9f6baac5b1fde96dfb345f1b3676cd3894c0b Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Fri, 4 Feb 2011 07:11:12 +0100 Subject: [PATCH] whitelist dashless identifiers Cc and Reference --- git-grep-footer | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/git-grep-footer b/git-grep-footer index c39222f..2e42b4a 100755 --- a/git-grep-footer +++ b/git-grep-footer @@ -23,7 +23,7 @@ GetOptions(\my %opt, local $| = 1; local $/ = "\0"; -my $HEADERMATCH = qr/ [a-z]+ (?: (?:-\w+)+ | \ by ) /ix; +my $HEADERMATCH = qr/ [a-z]+ (?: (?:-\w+)+ | \ by ) | cc | reference /ix; my (%headercount, @headercache); @@ -85,7 +85,7 @@ while (readline) { }{<...>}imsx; } when (['var', 'vars', '']) { - when ($header[0] =~ /[ _-] (?: by | to ) $/imsx) { + when ($header[0] =~ /[ _-] (?: by | to ) $ | ^cc$/imsx) { $header[1] = undef; } for ($header[1]) { @@ -163,6 +163,7 @@ a common convention to list custom metadata such as C and C. Sections are identified by at least one leading keyword containing a dash +(or exceptionally recognised) followed by a colon. =head1 OPTIONS -- 2.30.0