userdiff: fix typo in ruby and python word regexes
Both had an unclosed ] that ruined the safeguard against not matching a non-space char. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Thomas Rast committed
Dec 18, 2010 at 17:17 UTC
b34f69f9916e52e742f35c2f88286375142260de
1 file changed
+2
-2
userdiff.c
+2
-2
@@ -74,14 +74,14 @@ PATTERNS("python", "^[ \t]*((class|def)[ \t].*)$",
74
"[a-zA-Z_][a-zA-Z0-9_]*"
75
"|[-+0-9.e]+[jJlL]?|0[xX]?[0-9a-fA-F]+[lL]?"
76
"|[-+*/<>%&^|=!]=|//=?|<<=?|>>=?|\\*\\*=?"
77
- "|[^[:space:]|[\x80-\xff]+"),
77
+ "|[^[:space:]]|[\x80-\xff]+"),
78
/* -- */
79
PATTERNS("ruby", "^[ \t]*((class|module|def)[ \t].*)$",
80
/* -- */
81
"(@|@@|\\$)?[a-zA-Z_][a-zA-Z0-9_]*"
82
"|[-+0-9.e]+|0[xXbB]?[0-9a-fA-F]+|\\?(\\\\C-)?(\\\\M-)?."
83
"|//=?|[-+*/<>%&^|=!]=|<<=?|>>=?|===|\\.{1,3}|::|[!=]~"
84
- "|[^[:space:]|[\x80-\xff]+"),
84
+ "|[^[:space:]]|[\x80-\xff]+"),
85
PATTERNS("bibtex", "(@[a-zA-Z]{1,}[ \t]*\\{{0,1}[ \t]*[^ \t\"@',\\#}{~%]*).*$",
86
"[={}\"]|[^={}\" \t]+"),
87
PATTERNS("tex", "^(\\\\((sub)*section|chapter|part)\\*{0,1}\\{.*)$",