mirror of
https://github.com/davidhalter/parso.git
synced 2025-12-10 14:41:58 +08:00
Fix diff parser: error dedent issues
This commit is contained in:
@@ -87,6 +87,9 @@ def _get_last_line(node_or_leaf):
|
||||
|
||||
|
||||
def _ends_with_newline(leaf, suffix=''):
|
||||
while leaf.type == 'error_leaf' and leaf.token_type == 'DEDENT':
|
||||
leaf = leaf.get_previous_leaf()
|
||||
|
||||
if leaf.type == 'error_leaf':
|
||||
typ = leaf.token_type.lower()
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user