|
diff --git a/ui-tree.c b/ui-tree.c index 61fcf5a..c608754 100644 --- a/ ui-tree.c+++ b/ ui-tree.c |
|
@@ -17,3 +17,3 @@ int header = 0; |
17 | |
17 | |
18 | static void print_text_buffer(char *buf, unsigned long size) |
18 | static void print_text_buffer(const char *name, char *buf, unsigned long size) |
19 | { |
19 | { |
@@ -24,2 +24,12 @@ static void print_text_buffer(char *buf, unsigned long size) |
24 | html("<table summary='blob content' class='blob'>\n"); |
24 | html("<table summary='blob content' class='blob'>\n"); |
| |
25 | if (ctx.repo->source_filter) { |
| |
26 | html("<tr><td class='lines'><pre><code>"); |
| |
27 | ctx.repo->source_filter->argv[1] = xstrdup(name); |
| |
28 | cgit_open_filter(ctx.repo->source_filter); |
| |
29 | write(STDOUT_FILENO, buf, size); |
| |
30 | cgit_close_filter(ctx.repo->source_filter); |
| |
31 | html("</code></pre></td></tr></table>\n"); |
| |
32 | return; |
| |
33 | } |
| |
34 | |
25 | html("<tr><td class='linenumbers'><pre>"); |
35 | html("<tr><td class='linenumbers'><pre>"); |
@@ -67,3 +77,3 @@ static void print_binary_buffer(char *buf, unsigned long size) |
67 | |
77 | |
68 | static void print_object(const unsigned char *sha1, char *path) |
78 | static void print_object(const unsigned char *sha1, char *path, const char *basename) |
69 | { |
79 | { |
@@ -95,3 +105,3 @@ static void print_object(const unsigned char *sha1, char *path) |
95 | else |
105 | else |
96 | print_text_buffer(buf, size); |
106 | print_text_buffer(basename, buf, size); |
97 | } |
107 | } |
@@ -221,3 +231,3 @@ static int walk_tree(const unsigned char *sha1, const char *base, int baselen, |
221 | } else { |
231 | } else { |
222 | print_object(sha1, buffer); |
232 | print_object(sha1, buffer, pathname); |
223 | return 0; |
233 | return 0; |
|