-rw-r--r-- | ui-tree.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -115,2 +115,3 @@ static int ls_item(const unsigned char *sha1, const char *base, int baselen, char *fullpath; + char *class; enum object_type type; @@ -147,3 +148,8 @@ static int ls_item(const unsigned char *sha1, const char *base, int baselen, } else { - cgit_tree_link(name, NULL, "ls-blob", ctx.qry.head, + class = strrchr(name, '.'); + if (class != NULL) { + class = fmt("ls-blob %s", class + 1); + } else + class = "ls-blob"; + cgit_tree_link(name, NULL, class, ctx.qry.head, curr_rev, fullpath); |