mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 01:04:59 +00:00
refactor: Improve choose_fence
function to check for fence start in lines
This commit is contained in:
parent
2753ac6b62
commit
230ec50209
1 changed files with 2 additions and 1 deletions
|
@ -493,9 +493,10 @@ class Coder:
|
|||
if content is not None:
|
||||
all_content += content + "\n"
|
||||
|
||||
lines = all_content.splitlines()
|
||||
good = False
|
||||
for fence_open, fence_close in self.fences:
|
||||
if fence_open in all_content or fence_close in all_content:
|
||||
if any(line.startswith(fence_open) or line.startswith(fence_close) for line in lines):
|
||||
continue
|
||||
good = True
|
||||
break
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue