diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-12-05 15:26:21 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-12-05 15:26:21 -0800 |
commit | 77230236e38fde817f395efcf66320785cf6f9af (patch) | |
tree | 426808f8d2f93825d74223d98daf80c71ceb1925 /userdiff.c | |
parent | 9ef569791f967c1559b498d8f77a2c42a14be2ed (diff) | |
parent | 53b10a140527253f61cfc209a4e85e132c0bc4ee (diff) | |
download | git-77230236e38fde817f395efcf66320785cf6f9af.tar.gz |
Merge branch 'gh/userdiff-matlab'
* gh/userdiff-matlab:
Add built-in diff patterns for MATLAB code
Diffstat (limited to 'userdiff.c')
-rw-r--r-- | userdiff.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/userdiff.c b/userdiff.c index bf553ad91b..7c983c14ff 100644 --- a/userdiff.c +++ b/userdiff.c @@ -37,6 +37,9 @@ PATTERNS("java", "|[-+0-9.e]+[fFlL]?|0[xXbB]?[0-9a-fA-F]+[lL]?" "|[-+*/<>%&^|=!]=" "|--|\\+\\+|<<=?|>>>?=?|&&|\\|\\|"), +PATTERNS("matlab", + "^[[:space:]]*((classdef|function)[[:space:]].*)$|^%%[[:space:]].*$", + "[a-zA-Z_][a-zA-Z0-9_]*|[-+0-9.e]+|[=~<>]=|\\.[*/\\^']|\\|\\||&&"), PATTERNS("objc", /* Negate C statements that can look like functions */ "!^[ \t]*(do|for|if|else|return|switch|while)\n" |