зеркало из https://github.com/microsoft/git.git
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:
Родитель
5cbef01aab
Коммит
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)
|
||||
|
|
Загрузка…
Ссылка в новой задаче