mirror of
https://github.com/davidhalter/parso.git
synced 2026-10-08 13:05:13 +08:00
Make sure to only copy nodes that have the same indentation in diff parser
This commit is contained in:
1 parent
3242e36859
commit
f8dce76ef7
2 files changed
+28
-2
No files matched your search
@@ -636,8 +636,9 @@ class _NodesTree(object):
|
||||
# lines above there was an invalid indent.
|
||||
indentation = _get_indentation(tree_nodes[0])
|
||||
for i, c in enumerate(tree_nodes):
|
||||
if c.start_pos[1] < indentation:
|
||||
if c.start_pos[1] != indentation:
|
||||
tree_nodes = tree_nodes[:i]
|
||||
break
|
||||
|
||||
old_working_stack = list(self._working_stack)
|
||||
old_prefix = self.prefix
|
||||
|
||||
Reference in new issue
Block a user