summaryrefslogtreecommitdiff
path: root/userdiff.c
diff options
context:
space:
mode:
Diffstat (limited to 'userdiff.c')
-rw-r--r--userdiff.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/userdiff.c b/userdiff.c
index 3a78fbf..bcae006 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 */