mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 09:44:59 +00:00
refactor: update regex patterns to match complete lines with optional whitespace
This commit is contained in:
parent
7729974253
commit
04a2cbb494
1 changed files with 3 additions and 3 deletions
|
@ -365,9 +365,9 @@ def do_replace(fname, content, before_text, after_text, fence=None):
|
|||
return new_content
|
||||
|
||||
|
||||
HEAD = r"<{5,9} SEARCH"
|
||||
DIVIDER = r"={5,9}"
|
||||
UPDATED = r">{5,9} REPLACE"
|
||||
HEAD = r"^<{5,9} SEARCH\s*$"
|
||||
DIVIDER = r"^={5,9}\s*$"
|
||||
UPDATED = r"^>{5,9} REPLACE\s*$"
|
||||
|
||||
HEAD_ERR = "<<<<<<< SEARCH"
|
||||
DIVIDER_ERR = "======="
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue