Diff options
authorBryce Kwon <bryce@brycekwon.com>
committerBryce Kwon <bryce@brycekwon.com>
commit
parent
tree
download
Open the tree's code cell in one place
Diffstat (limited to 'source')
-rw-r--r--source/ui-tree.c9
1 file changed, 3 insertions, 6 deletions
diff --git a/source/ui-tree.c b/source/ui-tree.c
index 2801a78..1c29e30 100644
--- a/source/ui-tree.c
+++ b/source/ui-tree.c
@@ -100,17 +100,14 @@ static void print_text_buffer(const char *filename, char *buf, size_t size)
html("<tr>\n");
}
+ html("<td class='lines'><pre><code>");
if (ctx.repo->source_filter) {
- html("<td class='lines'><pre><code>");
cgit_open_filter(ctx.repo->source_filter, filename);
html_raw(buf, size);
cgit_close_filter(ctx.repo->source_filter);
- html("</code></pre></td></tr></table>\n");
- return;
+ } else {
+ html_blob_txt(buf, size);
}
-
- html("<td class='lines'><pre><code>");
- html_blob_txt(buf, size);
html("</code></pre></td></tr></table>\n");
}