userdiff: fix grammar and style issues

Signed-off-by: Boxuan Li <liboxuan@connect.hku.hk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Boxuan Li
2019-05-30 00:15:39 +08:00
committed by Junio C Hamano
parent 91bf382fcf
commit 2731a7840a
2 changed files with 5 additions and 3 deletions

View File

@ -819,7 +819,7 @@ patterns are available:
- `java` suitable for source code in the Java language. - `java` suitable for source code in the Java language.
- `matlab` suitable for source code in the MATLAB and Octave language. - `matlab` suitable for source code in the MATLAB and Octave languages.
- `objc` suitable for source code in the Objective-C language. - `objc` suitable for source code in the Objective-C language.

View File

@ -58,9 +58,11 @@ PATTERNS("java",
"|[-+*/<>%&^|=!]=" "|[-+*/<>%&^|=!]="
"|--|\\+\\+|<<=?|>>>?=?|&&|\\|\\|"), "|--|\\+\\+|<<=?|>>>?=?|&&|\\|\\|"),
PATTERNS("matlab", PATTERNS("matlab",
/* Octave pattern is mostly the same as matlab, except that '%%%' and /*
* Octave pattern is mostly the same as matlab, except that '%%%' and
* '##' can also be used to begin code sections, in addition to '%%' * '##' can also be used to begin code sections, in addition to '%%'
* that is understood by both. */ * that is understood by both.
*/
"^[[:space:]]*((classdef|function)[[:space:]].*)$|^(%%%?|##)[[:space:]].*$", "^[[:space:]]*((classdef|function)[[:space:]].*)$|^(%%%?|##)[[:space:]].*$",
"[a-zA-Z_][a-zA-Z0-9_]*|[-+0-9.e]+|[=~<>]=|\\.[*/\\^']|\\|\\||&&"), "[a-zA-Z_][a-zA-Z0-9_]*|[-+0-9.e]+|[=~<>]=|\\.[*/\\^']|\\|\\||&&"),
PATTERNS("objc", PATTERNS("objc",