summaryrefslogtreecommitdiff
path: root/userdiff.c
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2019-12-13 17:55:35 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-12-13 20:20:48 (GMT)
commitd1b1384d6163efb85c3a93ee535cd795d92fec21 (patch)
treecd7eb65ccb482da95381b87dc456e16cec265546 /userdiff.c
parenta807200f67588f6e30a7b6ac4a3ad97ad176ccc7 (diff)
downloadgit-d1b1384d6163efb85c3a93ee535cd795d92fec21.zip
git-d1b1384d6163efb85c3a93ee535cd795d92fec21.tar.gz
git-d1b1384d6163efb85c3a93ee535cd795d92fec21.tar.bz2
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>
Diffstat (limited to 'userdiff.c')
-rw-r--r--userdiff.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/userdiff.c b/userdiff.c
index 577053c..0eb34bc 100644
--- a/userdiff.c
+++ b/userdiff.c
@@ -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 */