Teach "git diff" HTML funcname patterns
PATCH 1/1 Teach "git diff" HTML funcname patterns
Finds lines with <h1>..<h6> tags. The pattern is adapted from the ruby one.
Signed-off-by Johan Herland <[email protected]>
--- Documentation/gitattributes.txt | 2 ++ diff.c | 1 + 2 files changed, 3 insertions(+), 0 deletions(-)
Documentation/gitattributes.txt +2 -0
@@ -320,6 +320,8 @@ patterns are available: - `tex` suitable for source code for LaTeX documents. +- `html` suitable for HTML/XHTML documents. + Performing a three-way merge ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff.c +1 -0
@@ -1382,6 +1382,7 @@ static struct builtin_funcname_pattern { { "bibtex", "\\(@[a-zA-Z]\\{1,\\}[ \t]*{\\{0,1\\}[ \t]*[^ \t\"@',\\#}{~%]*\\).*$" }, { "tex", "^\\(\\\\\\(\\(sub\\)*section\\|chapter\\|part\\)\\*\\{0,1\\}{.*\\)$" }, { "ruby", "^\\s*\\(\\(class\\|module\\|def\\)\\s.*\\)$" }, + { "html", "^\\s*\\(<h[1-6]\\s.*>.*\\)$" }, };static const char *diff_funcname_pattern (struct diff_filespec *one)
Signature · 1 line
1.6.0.96.g2fad1
Quoted 1 line · Johan Herland
Finds lines with <h1>..<h6> tags. The pattern is adapted from the ruby one.
Don't you want to catch <H1>...<H6> too ?
Mike
PATCH v2 1/1 Teach "git diff" HTML funcname patterns
Finds lines with <h1>..<h6> tags. The pattern is adapted from the ruby one.
Signed-off-by Johan Herland <[email protected]>
---
Quoted 4 lines · Mike Hommey
Quoted 2 lines · Johan Herland
Finds lines with <h1>..<h6> tags. The pattern is adapted from the ruby one.
Don't you want to catch <H1>...<H6> too ?
Yes. Thanks.
Have fun!
...Johan
Documentation/gitattributes.txt | 2 ++ diff.c | 1 + 2 files changed, 3 insertions(+), 0 deletions(-)
Documentation/gitattributes.txt +2 -0
@@ -320,6 +320,8 @@ patterns are available: - `tex` suitable for source code for LaTeX documents. +- `html` suitable for HTML/XHTML documents. + Performing a three-way merge ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff.c +1 -0
@@ -1382,6 +1382,7 @@ static struct builtin_funcname_pattern { { "bibtex", "\\(@[a-zA-Z]\\{1,\\}[ \t]*{\\{0,1\\}[ \t]*[^ \t\"@',\\#}{~%]*\\).*$" }, { "tex", "^\\(\\\\\\(\\(sub\\)*section\\|chapter\\|part\\)\\*\\{0,1\\}{.*\\)$" }, { "ruby", "^\\s*\\(\\(class\\|module\\|def\\)\\s.*\\)$" }, + { "html", "^\\s*\\(<[Hh][1-6]\\s.*>.*\\)$" }, };static const char *diff_funcname_pattern (struct diff_filespec *one)
Signature · 1 line
1.6.0.96.g2fad1