mirror of
https://github.com/davidhalter/parso.git
synced 2026-11-01 01:06:18 +08:00
Fix diff parser: The previous fix was a bit off
This commit is contained in:
1 parent
069c08883a
commit
ce8b531175
2 files changed
+28
-3
No files matched your search
@@ -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