summaryrefslogtreecommitdiff
path: root/src/userdiff.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/userdiff.h')
-rw-r--r--src/userdiff.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/userdiff.h b/src/userdiff.h
index 93b4d0d58..2257035ac 100644
--- a/src/userdiff.h
+++ b/src/userdiff.h
@@ -193,9 +193,9 @@ PATTERNS("php",
"|[-+*/<>%&^|=!]=|--|\\+\\+|<<=?|>>=?|&&|\\|\\||::|->"),
PATTERNS("javascript",
- "^[ \t]*(\(?function[ \t].*)$\n"
- "^[ \t]*(var[ \t]+[a-zA-Z_][a-zA-Z0-9_]*[ \t]*=[ \t]*function[ \t\(].*)$\n"
- "^[ \t]*([a-zA-Z_][a-zA-Z0-9_]*[ \t]*:[ \t]*function[ \t\(].*)$",
+ "^[ \t]*(function[ \t][a-zA-Z_][^\{]*)\n"
+ "^[ \t]*(var[ \t]+[a-zA-Z_][a-zA-Z0-9_]*[ \t]*=[ \t]*function[ \t\(][^\{]*)\n"
+ "^[ \t]*([a-zA-Z_][a-zA-Z0-9_]*[ \t]*:[ \t]*function[ \t\(][^\{]*)",
/* -- */
"[a-zA-Z_][a-zA-Z0-9_]*"
"|[-+0-9.e]+[fFlL]?|0[xX]?[0-9a-fA-F]+[lL]?"