mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-03 11:14:59 +00:00
fix: improve URL pattern to handle trailing commas in links
This commit is contained in:
parent
fea7134064
commit
15c62e3e43
1 changed files with 1 additions and 1 deletions
|
@ -793,7 +793,7 @@ class Coder:
|
||||||
def check_and_open_urls(self, text: str) -> List[str]:
|
def check_and_open_urls(self, text: str) -> List[str]:
|
||||||
"""Check text for URLs and offer to open them in a browser."""
|
"""Check text for URLs and offer to open them in a browser."""
|
||||||
|
|
||||||
url_pattern = re.compile(r"(https?://[^\s/$.?#].[^\s]*?)([.']*$|[.'\s])")
|
url_pattern = re.compile(r"(https?://[^\s/$.?#].[^\s]*?)([.']*$|[.',\s])")
|
||||||
# ai strip trailing . or ' from the url!
|
# ai strip trailing . or ' from the url!
|
||||||
|
|
||||||
urls = list(set(url_pattern.findall(text))) # Use set to remove duplicates
|
urls = list(set(url_pattern.findall(text))) # Use set to remove duplicates
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue