mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-07 05:05:01 +00:00
Merge branch 'main' into edit-formats
This commit is contained in:
commit
fc6dd1877c
2 changed files with 15 additions and 1 deletions
|
@ -95,7 +95,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((len(pline) > 0 and pline[0].isspace()) for pline in part_lines):
|
||||
if all((not pline or 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