@matheusbsbs / matheus-bagliano / commits / a25e47377d
Fork 0

userdiff/perl: catch BEGIN/END/... and POD as headers

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Junio C Hamano committed Dec 27, 2010 at 09:19 UTC a25e47377d6a1ec1efc6972f2e5e55cf429603a1
1 file changed +3 -1
userdiff.c
+3 -1
@@ -63,7 +63,9 @@ PATTERNS("pascal",
63 "|[^[:space:]]|[\x80-\xff]+"),
64 PATTERNS("perl",
65 "^[ \t]*package .*;\n"
66 - "^[ \t]*sub .* \\{",
66 + "^[ \t]*sub .* \\{\n"
67 + "^[A-Z]+ \\{\n" /* BEGIN, END, ... */
68 + "^=head[0-9] ", /* POD */
69 /* -- */
70 "[[:alpha:]_'][[:alnum:]_']*"
71 "|0[xb]?[0-9a-fA-F_]*"