|
diff --git a/ui-tree.c b/ui-tree.c index 553dbaa..816e121 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.cfg.source_filter) { |
| |
26 | html("<tr><td class='lines'><pre><code>"); |
| |
27 | ctx.cfg.source_filter->argv[1] = xstrdup(name); |
| |
28 | cgit_open_filter(ctx.cfg.source_filter); |
| |
29 | write(STDOUT_FILENO, buf, size); |
| |
30 | cgit_close_filter(ctx.cfg.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 | } |
@@ -215,3 +225,3 @@ static int walk_tree(const unsigned char *sha1, const char *base, int baselen, |
215 | } else { |
225 | } else { |
216 | print_object(sha1, buffer); |
226 | print_object(sha1, buffer, pathname); |
217 | return 0; |
227 | return 0; |
|