Skip to content

Commit d1b1384

Browse files
emastegitster
authored andcommitted
userdiff: remove empty subexpression from elixir regex
The regex failed to compile on FreeBSD. Also add /* -- */ mark to separate the two regex entries given to the PATTERNS() macro, to make it consistent with patterns for other content types. Signed-off-by: Ed Maste <[email protected]> Reviewed-by: Jeff King <[email protected]> Helped-by: Johannes Sixt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent a807200 commit d1b1384

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

userdiff.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,9 @@ PATTERNS("dts",
3434
"|[-+*/%&^|!~]|>>|<<|&&|\\|\\|"),
3535
PATTERNS("elixir",
3636
"^[ \t]*((def(macro|module|impl|protocol|p)?|test)[ \t].*)$",
37+
/* -- */
3738
/* Atoms, names, and module attributes */
38-
"|[@:]?[a-zA-Z0-9@_?!]+"
39+
"[@:]?[a-zA-Z0-9@_?!]+"
3940
/* Numbers with specific base */
4041
"|[-+]?0[xob][0-9a-fA-F]+"
4142
/* Numbers */

0 commit comments

Comments
 (0)