From: Junio C Hamano Date: Mon, 27 Dec 2010 17:19:38 +0000 (-0800) Subject: userdiff/perl: catch BEGIN/END/... and POD as headers X-Git-Tag: v1.7.4-rc2~2^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a25e47377d6a1ec1efc6972f2e5e55cf429603a1;p=git.git userdiff/perl: catch BEGIN/END/... and POD as headers Signed-off-by: Junio C Hamano --- diff --git a/userdiff.c b/userdiff.c index fc2afe33a..c384b39e4 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_]*"