mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-24 06:15:00 +00:00
strip() the before_text when looking for empty ORIGINAL
This commit is contained in:
parent
cbfdd2a806
commit
4b56381382
1 changed files with 2 additions and 2 deletions
4
coder.py
4
coder.py
|
@ -389,13 +389,13 @@ class Coder:
|
|||
fname = Path(fname)
|
||||
|
||||
# does it want to make a new file?
|
||||
if not fname.exists() and not before_text:
|
||||
if not fname.exists() and not before_text.strip():
|
||||
print("Creating empty file:", fname)
|
||||
fname.touch()
|
||||
|
||||
content = fname.read_text()
|
||||
|
||||
if not before_text:
|
||||
if not before_text.strip():
|
||||
if content:
|
||||
new_content = content + after_text
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue