From 99bb0dbc9c058d3737054e11e417b8715874c75c Mon Sep 17 00:00:00 2001 From: Patrick Date: Tue, 23 Dec 2025 23:56:13 +0100 Subject: only show preview/code links on markdown blobs --- ui-tree.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'ui-tree.c') diff --git a/ui-tree.c b/ui-tree.c index 61049e7..897a92d 100644 --- a/ui-tree.c +++ b/ui-tree.c @@ -18,12 +18,11 @@ struct walk_tree_context { int state; }; -static void print_text_buffer(const char *name, char *buf, unsigned long size) +static void print_text_buffer(const char *name, char *buf, unsigned long size, bool is_markdown) { unsigned long lineno, idx; const char *numberfmt = "%1$d\n"; - bool is_markdown = (strncmp(".md", &name[strlen(name)-3], 3) == 0); if (is_markdown) { html("