1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-06 14:36:18 +02:00

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 <emaste@FreeBSD.org>
Reviewed-by: Jeff King <peff@peff.net>
Helped-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Ed Maste 2019-12-13 17:55:35 +00:00 committed by Junio C Hamano
parent a807200f67
commit d1b1384d61

View File

@ -34,8 +34,9 @@ PATTERNS("dts",
"|[-+*/%&^|!~]|>>|<<|&&|\\|\\|"),
PATTERNS("elixir",
"^[ \t]*((def(macro|module|impl|protocol|p)?|test)[ \t].*)$",
/* -- */
/* Atoms, names, and module attributes */
"|[@:]?[a-zA-Z0-9@_?!]+"
"[@:]?[a-zA-Z0-9@_?!]+"
/* Numbers with specific base */
"|[-+]?0[xob][0-9a-fA-F]+"
/* Numbers */