mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 17:55:01 +00:00
refactor: Simplify fence pattern matching in base_coder.py
This commit is contained in:
parent
7611211d1c
commit
38678fafc1
1 changed files with 3 additions and 2 deletions
|
@ -59,7 +59,8 @@ def wrap_fence(name):
|
|||
|
||||
|
||||
all_fences = [
|
||||
("``" + "`", "``" + "`"),
|
||||
("`" * 3, "`" * 3),
|
||||
("`" * 4, "`" * 4),
|
||||
wrap_fence("source"),
|
||||
wrap_fence("code"),
|
||||
wrap_fence("pre"),
|
||||
|
@ -520,7 +521,7 @@ class Coder:
|
|||
return False
|
||||
|
||||
# only show pretty output if fences are the normal triple-backtick
|
||||
if self.fence != self.fences[0]:
|
||||
if self.fence[0][0] != "`":
|
||||
return False
|
||||
|
||||
return True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue