mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 00:35:00 +00:00
put back bailout logic
This commit is contained in:
parent
ae9f42ef8a
commit
390d7faec4
1 changed files with 5 additions and 0 deletions
|
@ -119,6 +119,11 @@ def replace_part_with_missing_leading_whitespace(whole, part, replace):
|
|||
part_lines = [p[leading:] if p.strip() else p for p in part_lines]
|
||||
replace_lines = [p[leading:] if p.strip() else p for p in replace_lines]
|
||||
|
||||
# TODO: this logic needs to be fixed
|
||||
# if the max outdent still leaves space
|
||||
if all((not pline or pline[0].isspace()) for pline in part_lines):
|
||||
return
|
||||
|
||||
# can we find an exact match not including the leading whitespace
|
||||
for i in range(len(whole_lines) - len(part_lines) + 1):
|
||||
leading_whitespace = ""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue