From a25e47377d6a1ec1efc6972f2e5e55cf429603a1 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Mon, 27 Dec 2010 09:19:38 -0800 Subject: userdiff/perl: catch BEGIN/END/... and POD as headers Signed-off-by: Junio C Hamano --- userdiff.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'userdiff.c') 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_]*" -- cgit v1.2.3