Skip to content
Snippets Groups Projects
Commit fdad13c3 authored by Chris Lamb's avatar Chris Lamb :eyes:
Browse files

Pull out the generation of the diffhunk <tr>

parent b628a174
No related branches found
No related tags found
No related merge requests found
...@@ -415,15 +415,19 @@ class HTMLSideBySidePresenter: ...@@ -415,15 +415,19 @@ class HTMLSideBySidePresenter:
self.error_row = None self.error_row = None
def output_hunk_header(self, hunk_off1, hunk_size1, hunk_off2, hunk_size2): def output_hunk_header(self, hunk_off1, hunk_size1, hunk_off2, hunk_size2):
self.spl_print_func('<tr class="diffhunk">')
self.spl_print_func( self.spl_print_func(
u'<tr class="diffhunk"><td colspan="2">Offset %d, %d lines modified</td>' u'<td colspan="2">Offset %d, %d lines modified</td>'
% (hunk_off1, hunk_size1) % (hunk_off1, hunk_size1)
) )
self.spl_print_func( self.spl_print_func(
u'<td colspan="2">Offset %d, %d lines modified</td></tr>\n' u'<td colspan="2">Offset %d, %d lines modified</td>'
% (hunk_off2, hunk_size2) % (hunk_off2, hunk_size2)
) )
self.spl_print_func("</tr>\n")
def output_line( def output_line(
self, has_internal_linenos, type_name, s1, line1, s2, line2 self, has_internal_linenos, type_name, s1, line1, s2, line2
): ):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment