diff options
-rw-r--r-- | ui-ssdiff.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/ui-ssdiff.c b/ui-ssdiff.c index c456033..b6dc5b0 100644 --- a/ui-ssdiff.c +++ b/ui-ssdiff.c | |||
@@ -207,11 +207,13 @@ static void print_part_with_lcs(char *class, char *line, char *lcs) | |||
207 | } | 207 | } |
208 | } else if (line[i] == lcs[j]) { | 208 | } else if (line[i] == lcs[j]) { |
209 | same = 1; | 209 | same = 1; |
210 | htmlf("</span>"); | 210 | html("</span>"); |
211 | j += 1; | 211 | j += 1; |
212 | } | 212 | } |
213 | html_txt(c); | 213 | html_txt(c); |
214 | } | 214 | } |
215 | if (!same) | ||
216 | html("</span>"); | ||
215 | } | 217 | } |
216 | 218 | ||
217 | static void print_ssdiff_line(char *class, | 219 | static void print_ssdiff_line(char *class, |
@@ -236,7 +238,7 @@ static void print_ssdiff_line(char *class, | |||
236 | char *fileurl = cgit_fileurl(ctx.repo->url, "tree", old_file->path, id_str); | 238 | char *fileurl = cgit_fileurl(ctx.repo->url, "tree", old_file->path, id_str); |
237 | html("<td class='lineno'><a href='"); | 239 | html("<td class='lineno'><a href='"); |
238 | html(fileurl); | 240 | html(fileurl); |
239 | htmlf("' id='%s'>%s</a>", lineno_str, lineno_str + 1); | 241 | htmlf("'>%s</a>", lineno_str + 1); |
240 | html("</td>"); | 242 | html("</td>"); |
241 | htmlf("<td class='%s'>", class); | 243 | htmlf("<td class='%s'>", class); |
242 | free(fileurl); | 244 | free(fileurl); |
@@ -259,7 +261,7 @@ static void print_ssdiff_line(char *class, | |||
259 | char *fileurl = cgit_fileurl(ctx.repo->url, "tree", new_file->path, id_str); | 261 | char *fileurl = cgit_fileurl(ctx.repo->url, "tree", new_file->path, id_str); |
260 | html("<td class='lineno'><a href='"); | 262 | html("<td class='lineno'><a href='"); |
261 | html(fileurl); | 263 | html(fileurl); |
262 | htmlf("' id='%s'>%s</a>", lineno_str, lineno_str + 1); | 264 | htmlf("'>%s</a>", lineno_str + 1); |
263 | html("</td>"); | 265 | html("</td>"); |
264 | htmlf("<td class='%s'>", class); | 266 | htmlf("<td class='%s'>", class); |
265 | free(fileurl); | 267 | free(fileurl); |
@@ -405,7 +407,7 @@ void cgit_ssdiff_header_begin(void) | |||
405 | 407 | ||
406 | void cgit_ssdiff_header_end(void) | 408 | void cgit_ssdiff_header_end(void) |
407 | { | 409 | { |
408 | html("</td><tr>"); | 410 | html("</td></tr>"); |
409 | } | 411 | } |
410 | 412 | ||
411 | void cgit_ssdiff_footer(void) | 413 | void cgit_ssdiff_footer(void) |