t4018-diff-funcname: test syntax of builtin xfuncname patterns
[gitweb.git] / diff.c
diff --git a/diff.c b/diff.c
index 1bcbbd5bb1e67dc238fe4f773024d49c1f8d2af7..05dd8f0b566df29ff1dbe1e03db8b50f309d2329 100644 (file)
--- a/diff.c
+++ b/diff.c
@@ -1404,7 +1404,7 @@ static const struct funcname_pattern_entry *funcname_pattern(const char *ident)
 }
 
 static const struct funcname_pattern_entry builtin_funcname_pattern[] = {
-       { "bibtex", "(@[a-zA-Z]{1,}[ \t]*\{{0,1}[ \t]*[^ \t\"@',\\#}{~%]*).*$",
+       { "bibtex", "(@[a-zA-Z]{1,}[ \t]*\\{{0,1}[ \t]*[^ \t\"@',\\#}{~%]*).*$",
          REG_EXTENDED },
        { "html", "^[ \t]*(<[Hh][1-6][ \t].*>.*)$", REG_EXTENDED },
        { "java",
@@ -1421,8 +1421,10 @@ static const struct funcname_pattern_entry builtin_funcname_pattern[] = {
        { "python", "^[ \t]*((class|def)[ \t].*)$", REG_EXTENDED },
        { "ruby", "^[ \t]*((class|module|def)[ \t].*)$",
          REG_EXTENDED },
+       { "bibtex", "(@[a-zA-Z]{1,}[ \t]*\\{{0,1}[ \t]*[^ \t\"@',\\#}{~%]*).*$",
+         REG_EXTENDED },
        { "tex",
-         "^(\\\\((sub)*section|chapter|part)\\*{0,1}\{.*)$",
+         "^(\\\\((sub)*section|chapter|part)\\*{0,1}\\{.*)$",
          REG_EXTENDED },
 };