Skip to content

Commit

Permalink
userdiff/perl: catch BEGIN/END/... and POD as headers
Browse files Browse the repository at this point in the history
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Junio C Hamano committed Dec 27, 2010
1 parent 71a5d4b commit a25e473
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion userdiff.c
Original file line number Diff line number Diff line change
Expand Up @@ -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_]*"
Expand Down

0 comments on commit a25e473

Please sign in to comment.