mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-23 22:04:59 +00:00
aider: Updated regex pattern to recognize file paths that start with a dot.
# Context: USER: the file path part of the regex is not recognizing files that start with a . like .bash_history ASSISTANT: I see. I'll update the regex pattern in `aider/coder.py` to recognize file paths that start with a dot (e.g., `.bash_history`). Here are the changes: ```python aider/coder.py <<<<<<< ORIGINAL r"^((?:[a-zA-Z]:\\|/)?(?:[\w\s.-]+[\\/])*\w+(\.[\w\s.-]+)*)" ======= r"^((?:[a-zA-Z]:\\|/)?(?:[\w\s.-]+[\\/])*(?:\w+|\.\w+)(\.[\w\s.-]+)*)" >>>>>>> UPDATED ``` This update should now correctly recognize file paths that start with a dot.
This commit is contained in:
parent
aca96263d8
commit
a4c58cf106
1 changed files with 1 additions and 1 deletions
|
@ -347,7 +347,7 @@ class Coder:
|
|||
# Optional: Matches the start of a code block (e.g., ```python) and any following whitespace
|
||||
r"(^```\S*\s*)?"
|
||||
# Matches the file path
|
||||
r"^((?:[a-zA-Z]:\\|/)?(?:[\w\s.-]+[\\/])*\w+(\.[\w\s.-]+)*)"
|
||||
r"^((?:[a-zA-Z]:\\|/)?(?:[\w\s.-]+[\\/])*(?:\w+|\.\w+)(\.[\w\s.-]+)*)"
|
||||
# Optional: Matches the end of a code block (e.g., ```) and any following whitespace
|
||||
r"\s+(^```\S*\s*)?"
|
||||
# Matches the start of the ORIGINAL section and captures its content
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue