mirror of
https://github.com/davidhalter/parso.git
synced 2025-12-08 21:54:54 +08:00
Fix diff parser: The previous fix was a bit off
This commit is contained in:
@@ -676,9 +676,7 @@ class _NodesTree(object):
|
||||
# line, otherwise it's going to be missing. This happens e.g.
|
||||
# if a bracket is around before that moves newlines to
|
||||
# prefixes.
|
||||
newline_index = max(p.rfind('\n'), p.rfind('\r'))
|
||||
if newline_index > -1:
|
||||
new_prefix = p[:newline_index + 1]
|
||||
new_prefix = split_lines(p, keepends=True)[0]
|
||||
|
||||
if had_valid_suite_last:
|
||||
last = new_nodes[-1]
|
||||
|
||||
Reference in New Issue
Block a user