Browse Source

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>
maint
Giuseppe Bilotta 17 years ago committed by Junio C Hamano
parent
commit
ad8c1d9260
  1. 1
      diff.c

1
diff.c

@ -1381,6 +1381,7 @@ static struct builtin_funcname_pattern { @@ -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…
Cancel
Save