From: Ævar Arnfjörð Bjarmason Date: Thu, 8 Apr 2021 15:04:18 +0000 (+0200) Subject: userdiff style: normalize pascal regex declaration X-Git-Tag: v2.32.0-rc0~73^2~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=82512e008c82834df5a00ea79e1091da45b330b0;p=thirdparty%2Fgit.git userdiff style: normalize pascal regex declaration Declare the pascal pattern consistently with how we declare the others, not having "\n" on one line by itself, but as part of the pattern, and when there are alterations have the "|" at the start, not end of the line. Signed-off-by: Ævar Arnfjörð Bjarmason Signed-off-by: Junio C Hamano --- diff --git a/userdiff.c b/userdiff.c index 33b0ce4020..978ae64155 100644 --- a/userdiff.c +++ b/userdiff.c @@ -175,9 +175,8 @@ PATTERNS("objc", "|[-+0-9.e]+[fFlL]?|0[xXbB]?[0-9a-fA-F]+[lL]?" "|[-+*/<>%&^|=!]=|--|\\+\\+|<<=?|>>=?|&&|\\|\\||::|->"), PATTERNS("pascal", - "^(((class[ \t]+)?(procedure|function)|constructor|destructor|interface|" - "implementation|initialization|finalization)[ \t]*.*)$" - "\n" + "^(((class[ \t]+)?(procedure|function)|constructor|destructor|interface" + "|implementation|initialization|finalization)[ \t]*.*)$\n" "^(.*=[ \t]*(class|record).*)$", /* -- */ "[a-zA-Z_][a-zA-Z0-9_]*"