]> git.ipfire.org Git - thirdparty/git.git/blobdiff - userdiff.c
Merge branch 'jt/t5500-unflake'
[thirdparty/git.git] / userdiff.c
index efbe05e5a5b6f1aa9a6b92365a4f987f6078dc04..1df884ef0bbfbba5a751eafc1922369ad818fce5 100644 (file)
@@ -79,6 +79,9 @@ PATTERNS("java",
         "|[-+0-9.e]+[fFlL]?|0[xXbB]?[0-9a-fA-F]+[lL]?"
         "|[-+*/<>%&^|=!]="
         "|--|\\+\\+|<<=?|>>>?=?|&&|\\|\\|"),
+PATTERNS("markdown",
+        "^ {0,3}#{1,6}[ \t].*",
+        "[^<>= \t]+"),
 PATTERNS("matlab",
         /*
          * Octave pattern is mostly the same as matlab, except that '%%%' and
@@ -222,7 +225,7 @@ static struct userdiff_driver driver_false = {
        { NULL, 0 }
 };
 
-static struct userdiff_driver *userdiff_find_by_namelen(const char *k, int len)
+static struct userdiff_driver *userdiff_find_by_namelen(const char *k, size_t len)
 {
        int i;
        for (i = 0; i < ndrivers; i++) {
@@ -266,7 +269,7 @@ int userdiff_config(const char *k, const char *v)
 {
        struct userdiff_driver *drv;
        const char *name, *type;
-       int namelen;
+       size_t namelen;
 
        if (parse_config_key(k, "diff", &name, &namelen, &type) || !name)
                return 0;