diff --git a/kallithea/lib/diffs.py b/kallithea/lib/diffs.py --- a/kallithea/lib/diffs.py +++ b/kallithea/lib/diffs.py @@ -77,7 +77,6 @@ def as_html(parsed_lines, table_class='c }) for file_info in parsed_lines: - count_no_lineno = 0 # counter to allow comments on lines without new/old line numbers for chunk in file_info['chunks']: _html_empty = False for change in chunk: @@ -128,11 +127,10 @@ def as_html(parsed_lines, table_class='c ########################################################### # NO LINE NUMBER ########################################################### - anchor = "%(filename)s_%(count_no_lineno)s" % { + anchor = "%(filename)s_%(context_lineno)s" % { 'filename': _safe_id(file_info['filename']), - 'count_no_lineno': count_no_lineno, + 'context_lineno': change['context_lineno'], } - count_no_lineno += 1 _html.append('''\t