Show More
@@ -107,12 +107,9 b" def as_html(table_class='code-difftable'" | |||
|
107 | 107 | 'filename': _safe_id(file_info['filename']), |
|
108 | 108 | 'newline_no': change['new_lineno'] |
|
109 | 109 | } |
|
110 |
cond_old = |
|
|
111 |
|
|
|
112 |
|
|
|
113 | change['new_lineno']) | |
|
114 | no_lineno = (change['old_lineno'] == '...' and | |
|
115 | change['new_lineno'] == '...') | |
|
110 | cond_old = change['old_lineno'] | |
|
111 | cond_new = change['new_lineno'] | |
|
112 | no_lineno = not change['old_lineno'] and not change['new_lineno'] | |
|
116 | 113 | if cond_old: |
|
117 | 114 | anchor_old_id = 'id="%s"' % anchor_old |
|
118 | 115 | if cond_new: |
@@ -587,8 +584,8 b' def _parse_lines(diff_lines):' | |||
|
587 | 584 | # skip context only if it's first line |
|
588 | 585 | if int(gr[0]) > 1: |
|
589 | 586 | lines.append({ |
|
590 |
'old_lineno': ' |
|
|
591 |
'new_lineno': ' |
|
|
587 | 'old_lineno': '', | |
|
588 | 'new_lineno': '', | |
|
592 | 589 | 'action': 'context', |
|
593 | 590 | 'line': line, |
|
594 | 591 | }) |
@@ -632,8 +629,8 b' def _parse_lines(diff_lines):' | |||
|
632 | 629 | # we need to append to lines, since this is not |
|
633 | 630 | # counted in the line specs of diff |
|
634 | 631 | lines.append({ |
|
635 |
'old_lineno': ' |
|
|
636 |
'new_lineno': ' |
|
|
632 | 'old_lineno': '', | |
|
633 | 'new_lineno': '', | |
|
637 | 634 | 'action': 'context', |
|
638 | 635 | 'line': line, |
|
639 | 636 | }) |
@@ -295,7 +295,7 b' class TestDiffLib(base.TestController):' | |||
|
295 | 295 | l.append('%(action)-7s %(new_lineno)3s %(old_lineno)3s %(line)r\n' % d) |
|
296 | 296 | s = ''.join(l) |
|
297 | 297 | assert s == r''' |
|
298 |
context |
|
|
298 | context '@@ -51,6 +51,13 @@\n' | |
|
299 | 299 | unmod 51 51 '<u>\t</u>begin();\n' |
|
300 | 300 | unmod 52 52 '<u>\t</u>\n' |
|
301 | 301 | add 53 '<u>\t</u>int foo;<u class="cr"></u>\n' |
General Comments 0
You need to be logged in to leave comments.
Login now