mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 17:55:01 +00:00
Fix for issue #24, provided by @wwestenbrink
This commit is contained in:
parent
4dee70d825
commit
44198e8b3b
1 changed files with 1 additions and 1 deletions
|
@ -67,7 +67,7 @@ def replace_part_with_missing_leading_whitespace(whole, part, replace):
|
|||
# If all lines in the part start with whitespace, then honor it.
|
||||
# But GPT often outdents the part and replace blocks completely,
|
||||
# thereby discarding the actual leading whitespace in the file.
|
||||
if all(pline[0].isspace() for pline in part_lines):
|
||||
if all((len(pline) > 0 and pline[0].isspace()) for pline in part_lines):
|
||||
return
|
||||
|
||||
for i in range(len(whole_lines) - len(part_lines) + 1):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue