summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2010-12-27 09:19:38 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2010-12-27 09:19:38 -0800
commita25e47377d6a1ec1efc6972f2e5e55cf429603a1 (patch)
tree9fd862f8e50c5876336421e1a115d880ad6c6db4
parentdiff: funcname and word patterns for perl (diff)
downloadtgif-a25e47377d6a1ec1efc6972f2e5e55cf429603a1.tar.xz
userdiff/perl: catch BEGIN/END/... and POD as headers
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--userdiff.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/userdiff.c b/userdiff.c
index fc2afe33a7..c384b39e4d 100644
--- a/userdiff.c
+++ b/userdiff.c
@@ -63,7 +63,9 @@ PATTERNS("pascal",
"|[^[:space:]]|[\x80-\xff]+"),
PATTERNS("perl",
"^[ \t]*package .*;\n"
- "^[ \t]*sub .* \\{",
+ "^[ \t]*sub .* \\{\n"
+ "^[A-Z]+ \\{\n" /* BEGIN, END, ... */
+ "^=head[0-9] ", /* POD */
/* -- */
"[[:alpha:]_'][[:alnum:]_']*"
"|0[xb]?[0-9a-fA-F_]*"