diff options
| author | Junio C Hamano <gitster@pobox.com> | 2016-06-20 11:01:02 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2016-06-20 11:01:02 -0700 |
| commit | 8699b74ae1190b90facdbe83a879251c8a9e07ac (patch) | |
| tree | f92ce3547ca3bdd0e39ae3e245489dce74489b93 /userdiff.c | |
| parent | 1958a17fe41ab424d7d655de66a04a7711e7bbd3 (diff) | |
| parent | 0719f3eecd1234f6331cab980088239207e93335 (diff) | |
| download | git-8699b74ae1190b90facdbe83a879251c8a9e07ac.tar.xz | |
Merge branch 'wd/userdiff-css'
Update the funcname definition to support css files.
* wd/userdiff-css:
userdiff: add built-in pattern for CSS
Diffstat (limited to 'userdiff.c')
| -rw-r--r-- | userdiff.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/userdiff.c b/userdiff.c index 6bf2505994..2125d6da26 100644 --- a/userdiff.c +++ b/userdiff.c @@ -148,6 +148,18 @@ PATTERNS("csharp", "[a-zA-Z_][a-zA-Z0-9_]*" "|[-+0-9.e]+[fFlL]?|0[xXbB]?[0-9a-fA-F]+[lL]?" "|[-+*/<>%&^|=!]=|--|\\+\\+|<<=?|>>=?|&&|\\|\\||::|->"), +IPATTERN("css", + "![:;][[:space:]]*$\n" + "^[_a-z0-9].*$", + /* -- */ + /* + * This regex comes from W3C CSS specs. Should theoretically also + * allow ISO 10646 characters U+00A0 and higher, + * but they are not handled in this regex. + */ + "-?[_a-zA-Z][-_a-zA-Z0-9]*" /* identifiers */ + "|-?[0-9]+|\\#[0-9a-fA-F]+" /* numbers */ +), { "default", NULL, -1, { NULL, 0 } }, }; #undef PATTERNS |
