mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 09:44:59 +00:00
style: format shell code block starts
This commit is contained in:
parent
64b92c8d89
commit
a0f9989f1c
1 changed files with 9 additions and 4 deletions
|
@ -409,13 +409,18 @@ def find_original_update_blocks(content, fence=DEFAULT_FENCE):
|
||||||
|
|
||||||
# Check for various shell code blocks
|
# Check for various shell code blocks
|
||||||
shell_starts = [
|
shell_starts = [
|
||||||
"```bash", "```sh", "```shell", # Unix-like shells
|
"```bash",
|
||||||
"```cmd", "```batch", # Windows Command Prompt
|
"```sh",
|
||||||
"```powershell", "```ps1", # Windows PowerShell
|
"```shell", # Unix-like shells
|
||||||
|
"```cmd",
|
||||||
|
"```batch", # Windows Command Prompt
|
||||||
|
"```powershell",
|
||||||
|
"```ps1", # Windows PowerShell
|
||||||
"```zsh", # Z shell
|
"```zsh", # Z shell
|
||||||
"```fish", # Friendly Interactive Shell
|
"```fish", # Friendly Interactive Shell
|
||||||
"```ksh", # Korn Shell
|
"```ksh", # Korn Shell
|
||||||
"```csh", "```tcsh", # C Shell and TENEX C Shell
|
"```csh",
|
||||||
|
"```tcsh", # C Shell and TENEX C Shell
|
||||||
]
|
]
|
||||||
if any(cur.strip().startswith(start) for start in shell_starts):
|
if any(cur.strip().startswith(start) for start in shell_starts):
|
||||||
shell_content = []
|
shell_content = []
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue