Skip to content

Commit b34f69f

Browse files
trastgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 8e8aa44 commit b34f69f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

userdiff.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,14 @@ PATTERNS("python", "^[ \t]*((class|def)[ \t].*)$",
7474
"[a-zA-Z_][a-zA-Z0-9_]*"
7575
"|[-+0-9.e]+[jJlL]?|0[xX]?[0-9a-fA-F]+[lL]?"
7676
"|[-+*/<>%&^|=!]=|//=?|<<=?|>>=?|\\*\\*=?"
77-
"|[^[:space:]|[\x80-\xff]+"),
77+
"|[^[:space:]]|[\x80-\xff]+"),
7878
/* -- */
7979
PATTERNS("ruby", "^[ \t]*((class|module|def)[ \t].*)$",
8080
/* -- */
8181
"(@|@@|\\$)?[a-zA-Z_][a-zA-Z0-9_]*"
8282
"|[-+0-9.e]+|0[xXbB]?[0-9a-fA-F]+|\\?(\\\\C-)?(\\\\M-)?."
8383
"|//=?|[-+*/<>%&^|=!]=|<<=?|>>=?|===|\\.{1,3}|::|[!=]~"
84-
"|[^[:space:]|[\x80-\xff]+"),
84+
"|[^[:space:]]|[\x80-\xff]+"),
8585
PATTERNS("bibtex", "(@[a-zA-Z]{1,}[ \t]*\\{{0,1}[ \t]*[^ \t\"@',\\#}{~%]*).*$",
8686
"[={}\"]|[^={}\" \t]+"),
8787
PATTERNS("tex", "^(\\\\((sub)*section|chapter|part)\\*{0,1}\\{.*)$",

0 commit comments

Comments
 (0)