mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 01:04:59 +00:00
do not treat editblocks as shell commands
This commit is contained in:
parent
695e8c384c
commit
4555e36e20
1 changed files with 3 additions and 1 deletions
|
@ -459,7 +459,9 @@ def find_original_update_blocks(content, fence=DEFAULT_FENCE):
|
||||||
"```csh",
|
"```csh",
|
||||||
"```tcsh",
|
"```tcsh",
|
||||||
]
|
]
|
||||||
if any(line.strip().startswith(start) for start in shell_starts):
|
next_is_editblock = i + 1 < len(lines) and lines[i + 1].rstrip() == HEAD
|
||||||
|
|
||||||
|
if any(line.strip().startswith(start) for start in shell_starts) and not next_is_editblock:
|
||||||
shell_content = []
|
shell_content = []
|
||||||
i += 1
|
i += 1
|
||||||
while i < len(lines) and not lines[i].strip().startswith("```"):
|
while i < len(lines) and not lines[i].strip().startswith("```"):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue