Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
userdiff/perl: catch BEGIN/END/... and POD as headers
[gitweb.git]
/
userdiff.c
diff --git
a/userdiff.c
b/userdiff.c
index fc2afe33a7640677fbf3a10bbdbec25b023f752c..c384b39e4daf1226a2c13c74dc2a4a2f75b8e63b 100644
(file)
--- 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_]*"