提交 7c17205b 编写于 作者: K Kirill Smelkov 提交者: Junio C Hamano

Teach "git diff -p" Python funcname patterns

Find classes, functions, and methods definitions.
Signed-off-by: NKirill Smelkov <kirr@mns.spb.ru>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 5630feaf
......@@ -316,6 +316,8 @@ patterns are available:
- `pascal` suitable for source code in the Pascal/Delphi language.
- `python` suitable for source code in the Python language.
- `ruby` suitable for source code in the Ruby language.
- `tex` suitable for source code for LaTeX documents.
......
......@@ -1394,6 +1394,7 @@ static struct builtin_funcname_pattern {
},
{ "bibtex", "\\(@[a-zA-Z]\\{1,\\}[ \t]*{\\{0,1\\}[ \t]*[^ \t\"@',\\#}{~%]*\\).*$" },
{ "tex", "^\\(\\\\\\(\\(sub\\)*section\\|chapter\\|part\\)\\*\\{0,1\\}{.*\\)$" },
{ "python", "^\\s*\\(\\(class\\|def\\)\\s.*\\)$" },
{ "ruby", "^\\s*\\(\\(class\\|module\\|def\\)\\s.*\\)$" },
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册