@@ -184,17 +184,18 @@ PATTERNS("java",
"|[-+*/<>%&^|=!]="
"|--|\\+\\+|<<=?|>>>?=?|&&|\\|\\|"),
PATTERNS("javascript",
- /* Looks for lines that start with optional whitespace, followed
- * by 'function'* and any characters (for function declarations),
- * or valid JavaScript identifiers, equals sign '=', 'function' keyword
- * and any characters (for function expressions).
- * Also considers functions defined inside blocks with '{...}'.
- */
- "^[ \t]*(function[ \t]*.*|[a-zA-Z_$][0-9a-zA-Z_$]*[ \t]*=[ \t]*function[ \t]*.*|(\\{[ \t]*)?)\n",
- /* This pattern matches JavaScript identifiers */
- "[a-zA-Z_$][0-9a-zA-Z_$]*"
- "|[-+0-9.eE]+|0[xX][0-9a-fA-F]+"
- "|[-+*/<>%&^|=!:]=|--|\\+\\+|<<=?|>>=?|&&|\\|\\|"),
+ /*
+ * Look for lines that start with optional whitespace, followed
+ * by 'function' and any characters (for function declarations),
+ * or valid JavaScript identifiers, equals sign '=', 'function' keyword
+ * and any characters (for function expressions).
+ * Also consider functions defined inside blocks with '{...}'.
+ */
+ "^[ \t]*(function[ \t]*.*|[a-zA-Z_$][0-9a-zA-Z_$]*[ \t]*=[ \t]*function[ \t]*.*|(\\{[ \t]*)?)\n",
+ /* Match JavaScript identifiers with this pattern */
+ "[a-zA-Z_$][0-9a-zA-Z_$]*"
+ "|[-+0-9.eE]+|0[xX][0-9a-fA-F]+"
+ "|[-+*/<>%&^|=!:]=|--|\\+\\+|<<=?|>>=?|&&|\\|\\|"),
PATTERNS("kotlin",
"^[ \t]*(([a-z]+[ \t]+)*(fun|class|interface)[ \t]+.*)$",
/* -- */
This patch removes trailing whitespaces and fixes multiline comments in the `userdiff.c` file to match Gits coding standards as seen in [1]. Signed-off-by: Sergius Nyah <sergiusnyah@gmail.com> --- userdiff.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) -- 2.43.2 [1]: https://github.com/git/git/blob/master/Documentation/CodingGuidelines