mirror of
https://github.com/davidhalter/parso.git
synced 2025-12-09 06:04:54 +08:00
Fix a regex clause that was totally wrong
This commit is contained in:
@@ -388,7 +388,7 @@ class DiffParser(object):
|
||||
# endmarker or another dedented code block.
|
||||
typ, string, start_pos, prefix = next(tokens)
|
||||
if '\n' in prefix or '\r' in prefix:
|
||||
prefix = re.sub(r'(<=\n|\r)[^\n\r]+$', '', prefix)
|
||||
prefix = re.sub(r'(?<=\n|\r)[^\n\r]+$', '', prefix)
|
||||
else:
|
||||
prefix = ''
|
||||
yield PythonToken(
|
||||
|
||||
Reference in New Issue
Block a user