Skip to content

Commit a25e473

Browse files
committed
userdiff/perl: catch BEGIN/END/... and POD as headers
Signed-off-by: Junio C Hamano <[email protected]>
1 parent 71a5d4b commit a25e473

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

userdiff.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ PATTERNS("pascal",
6363
"|[^[:space:]]|[\x80-\xff]+"),
6464
PATTERNS("perl",
6565
"^[ \t]*package .*;\n"
66-
"^[ \t]*sub .* \\{",
66+
"^[ \t]*sub .* \\{\n"
67+
"^[A-Z]+ \\{\n" /* BEGIN, END, ... */
68+
"^=head[0-9] ", /* POD */
6769
/* -- */
6870
"[[:alpha:]_'][[:alnum:]_']*"
6971
"|0[xb]?[0-9a-fA-F_]*"

0 commit comments

Comments
 (0)