diff parser : update next variable
In Python 3 this is a keyword, rename to nextline to avoid confusion Change-Id: I46ebdeed3529587b21b3d17383331877e98c8d82
This commit is contained in:
parent
0a52b74bba
commit
8057480ced
@ -51,15 +51,15 @@ class DiffRenderer(object):
|
||||
pass
|
||||
return (None, None), (None, None)
|
||||
|
||||
def _highlight_line(self, line, next):
|
||||
def _highlight_line(self, line, nextline):
|
||||
"""Highlight inline changes in both lines."""
|
||||
start = 0
|
||||
limit = min(len(line['line']), len(next['line']))
|
||||
while start < limit and line['line'][start] == next['line'][start]:
|
||||
limit = min(len(line['line']), len(nextline['line']))
|
||||
while start < limit and line['line'][start] == nextline['line'][start]:
|
||||
start += 1
|
||||
end = -1
|
||||
limit -= start
|
||||
while -end <= limit and line['line'][end] == next['line'][end]:
|
||||
while -end <= limit and line['line'][end] == nextline['line'][end]:
|
||||
end -= 1
|
||||
end += 1
|
||||
if start or end:
|
||||
@ -77,7 +77,7 @@ class DiffRenderer(object):
|
||||
iterline['line'][last:]
|
||||
)
|
||||
do(line)
|
||||
do(next)
|
||||
do(nextline)
|
||||
|
||||
def _parse_info(self):
|
||||
"""Look for custom information preceding the diff."""
|
||||
|
Loading…
x
Reference in New Issue
Block a user