Merge branch 'rs/xdiff-merge-overlapping-hunks-for-W-context' into maint
[gitweb.git] / userdiff.c
index 6bf2505994b1d1054604b84d49faeb45eb6a9534..2125d6da26dbdc01f7397415ef1f67616e6f2a71 100644 (file)
@@ -148,6 +148,18 @@ PATTERNS("csharp",
         "[a-zA-Z_][a-zA-Z0-9_]*"
         "|[-+0-9.e]+[fFlL]?|0[xXbB]?[0-9a-fA-F]+[lL]?"
         "|[-+*/<>%&^|=!]=|--|\\+\\+|<<=?|>>=?|&&|\\|\\||::|->"),
+IPATTERN("css",
+        "![:;][[:space:]]*$\n"
+        "^[_a-z0-9].*$",
+        /* -- */
+        /*
+         * This regex comes from W3C CSS specs. Should theoretically also
+         * allow ISO 10646 characters U+00A0 and higher,
+         * but they are not handled in this regex.
+         */
+        "-?[_a-zA-Z][-_a-zA-Z0-9]*" /* identifiers */
+        "|-?[0-9]+|\\#[0-9a-fA-F]+" /* numbers */
+),
 { "default", NULL, -1, { NULL, 0 } },
 };
 #undef PATTERNS