mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 02:05:00 +00:00
Fix the actual replace step
This commit is contained in:
parent
1daf175c83
commit
329baf3717
1 changed files with 3 additions and 3 deletions
|
@ -80,9 +80,9 @@ def replace_part_with_missing_leading_whitespace(whole, part, replace):
|
||||||
)
|
)
|
||||||
|
|
||||||
if matched:
|
if matched:
|
||||||
for k in range(len(part_lines)):
|
replace_lines = [leading_whitespace + rline for rline in replace_lines]
|
||||||
whole_lines[i + k] = leading_whitespace + replace_lines[k]
|
whole_lines = whole_lines[:i] + replace_lines + whole_lines[i + len(part_lines) :]
|
||||||
return "\n".join(whole_lines)
|
return "\n".join(whole_lines) + "\n"
|
||||||
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue