mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 10:14:59 +00:00
fix: Handle filenames starting with fence chars in editblock coder
This commit is contained in:
parent
16fbff8de1
commit
48733a315b
1 changed files with 7 additions and 1 deletions
|
@ -412,7 +412,13 @@ def strip_filename(filename, fence):
|
||||||
return
|
return
|
||||||
|
|
||||||
start_fence = fence[0]
|
start_fence = fence[0]
|
||||||
if filename.startswith(start_fence) or filename.startswith(triple_backticks):
|
if filename.startswith(start_fence):
|
||||||
|
candidate = filename[len(start_fence):]
|
||||||
|
if candidate and "." in candidate:
|
||||||
|
return candidate
|
||||||
|
|
||||||
|
if filename.startswith(triple_backticks):
|
||||||
|
candidate = # ai!
|
||||||
return
|
return
|
||||||
|
|
||||||
filename = filename.rstrip(":")
|
filename = filename.rstrip(":")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue