mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-03 19:24:59 +00:00
quote with num_ticks
This commit is contained in:
parent
a6d80e815e
commit
9151cf03a1
2 changed files with 5 additions and 5 deletions
|
@ -3,10 +3,10 @@ from pathlib import Path
|
|||
from .dump import dump # noqa: F401
|
||||
|
||||
|
||||
def quoted_file(fname, display_fname, number=False):
|
||||
def quoted_file(fname, display_fname, fence_ticks="```", number=False):
|
||||
prompt = "\n"
|
||||
prompt += display_fname
|
||||
prompt += "\n````\n"
|
||||
prompt += f"\n{fence_ticks}\n"
|
||||
file_content = Path(fname).read_text()
|
||||
lines = file_content.splitlines()
|
||||
for i, line in enumerate(lines, start=1):
|
||||
|
@ -14,7 +14,7 @@ def quoted_file(fname, display_fname, number=False):
|
|||
prompt += f"{i:4d} "
|
||||
prompt += line + "\n"
|
||||
|
||||
prompt += "````\n"
|
||||
prompt += f"{fence_ticks}\n"
|
||||
return prompt
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue