mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 17:55:01 +00:00
only add newline for non-empty blocks
This commit is contained in:
parent
26ebc715eb
commit
5f7e1d8675
1 changed files with 1 additions and 1 deletions
|
@ -46,7 +46,7 @@ The ORIGINAL block needs to be EXACTLY the same as the lines in {path} with noth
|
|||
|
||||
|
||||
def prep(content):
|
||||
if not content.endswith("\n"):
|
||||
if content and not content.endswith("\n"):
|
||||
content += "\n"
|
||||
lines = content.splitlines(keepends=True)
|
||||
return content, lines
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue