diff options
Diffstat (limited to 'userdiff.c')
-rw-r--r-- | userdiff.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/userdiff.c b/userdiff.c index 3a78fbf504..bcae006abe 100644 --- a/userdiff.c +++ b/userdiff.c @@ -58,7 +58,10 @@ PATTERNS("java", "|[-+*/<>%&^|=!]=" "|--|\\+\\+|<<=?|>>>?=?|&&|\\|\\|"), PATTERNS("matlab", - "^[[:space:]]*((classdef|function)[[:space:]].*)$|^%%[[:space:]].*$", + /* Octave pattern is mostly the same as matlab, except that '%%%' and + * '##' can also be used to begin code sections, in addition to '%%' + * that is understood by both. */ + "^[[: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 */ |