@matheusbsbs / matheus-bagliano / commits / d1b1384d61
Fork 0

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>

Ed Maste committed Dec 13, 2019 at 17:55 UTC d1b1384d6163efb85c3a93ee535cd795d92fec21
1 file changed +2 -1
userdiff.c
+2 -1
@@ -34,8 +34,9 @@ PATTERNS("dts",
34 "|[-+*/%&^|!~]|>>|<<|&&|\\|\\|"),
35 PATTERNS("elixir",
36 "^[ \t]*((def(macro|module|impl|protocol|p)?|test)[ \t].*)$",
37 + /* -- */
38 /* Atoms, names, and module attributes */
38 - "|[@:]?[a-zA-Z0-9@_?!]+"
39 + "[@:]?[a-zA-Z0-9@_?!]+"
40 /* Numbers with specific base */
41 "|[-+]?0[xob][0-9a-fA-F]+"
42 /* Numbers */