mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 10:14:59 +00:00
fix: Adjust reasoning tag spacing to improve readability
This commit is contained in:
parent
490c6d9a28
commit
634745c818
1 changed files with 2 additions and 2 deletions
|
@ -1717,10 +1717,10 @@ class Coder:
|
|||
return match.group(1)
|
||||
|
||||
# Replace opening tag with proper spacing
|
||||
text = re.sub(f"\\s*<{tag_name}>\\s*", f"\n\n{REASONING_START}\n", text)
|
||||
text = re.sub(f"\\s*<{tag_name}>\\s*", f"\n\n{REASONING_START}\n\n", text)
|
||||
|
||||
# Replace closing tag with proper spacing
|
||||
text = re.sub(f"\\s*</{tag_name}>\\s*", f"\n\n{REASONING_END}", text)
|
||||
text = re.sub(f"\\s*</{tag_name}>\\s*", f"\n\n{REASONING_END}\n\n", text)
|
||||
|
||||
# Clean up any excessive newlines (more than 2 consecutive)
|
||||
text = re.sub(r"\n{3,}", "\n\n", text)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue