-rw-r--r-- | ui-ssdiff.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/ui-ssdiff.c b/ui-ssdiff.c index 3591ab4..8215051 100644 --- a/ui-ssdiff.c +++ b/ui-ssdiff.c @@ -108,6 +108,6 @@ static void print_ssdiff_line(char *class, int old_line_no, char *old_line, if (old_line_no > 0) - htmlf("<td class='%s'>%d </td><td class='%s'>", class, + htmlf("<td class='lineno'>%d</td><td class='%s'>", old_line_no, class); else - htmlf("<td class='%s_dark'> </td><td class='%s_dark'>", class, class); + htmlf("<td class='lineno'></td><td class='%s_dark'>", class); @@ -122,6 +122,6 @@ static void print_ssdiff_line(char *class, int old_line_no, char *old_line, if (new_line_no > 0) - htmlf("<td class='%s'> %d </td><td class='%s'>", class, + htmlf("<td class='lineno'>%d</td><td class='%s'>", new_line_no, class); else - htmlf("<td class='%s_dark'> </td><td class='%s_dark'>", class, class); + htmlf("<td class='lineno'></td><td class='%s_dark'>", class); @@ -251,3 +251,3 @@ void cgit_ssdiff_line_cb(char *line, int len) -void cgit_ssdiff_header() +void cgit_ssdiff_header_begin() { @@ -255,3 +255,9 @@ void cgit_ssdiff_header() current_new_line = 0; - html("<table class='ssdiff'>"); + html("<tr><td class='space' colspan='4'><div></div></td></tr>"); + html("<tr><td class='head' colspan='4'>"); +} + +void cgit_ssdiff_header_end() +{ + html("</td><tr>"); } @@ -262,3 +268,3 @@ void cgit_ssdiff_footer() cgit_ssdiff_print_deferred_lines(); - html("</table>"); + html("<tr><td class='foot' colspan='4'></td></tr>"); } |