mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 16:54:59 +00:00
Handle case where part="" and replace is non-empty
This commit is contained in:
parent
e9debe71e8
commit
0c05e3d957
1 changed files with 6 additions and 0 deletions
|
@ -44,6 +44,12 @@ def try_dotdotdots(whole, part, replace):
|
|||
if not part and not replace:
|
||||
continue
|
||||
|
||||
if not part and replace:
|
||||
if not whole.endswith("\n"):
|
||||
whole += "\n"
|
||||
whole += replace
|
||||
continue
|
||||
|
||||
if part not in whole:
|
||||
raise ValueError("No perfect matching chunk in edit block with ...")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue