mirror of
https://github.com/git/git.git
synced 2024-11-20 14:34:03 +01:00
diff: add ruby funcname pattern
Provide a regexp that catches class, module and method definitions in Ruby scripts, since the built-in default only finds classes. Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
5cbef01aab
commit
ad8c1d9260
1
diff.c
1
diff.c
@ -1381,6 +1381,7 @@ static struct builtin_funcname_pattern {
|
||||
"[A-Za-z_][A-Za-z_0-9]*\\)\\{2,\\}"
|
||||
"[ ]*([^;]*\\)$" },
|
||||
{ "tex", "^\\(\\\\\\(sub\\)*section{.*\\)$" },
|
||||
{ "ruby", "^\\s*\\(\\(class\\|module\\|def\\)\\s.*\\)$" },
|
||||
};
|
||||
|
||||
static const char *diff_funcname_pattern(struct diff_filespec *one)
|
||||
|
Loading…
Reference in New Issue
Block a user