Fixed the check_for_urls method per the GitHub issue #845.

This commit is contained in:
Paul Gauthier (aider) 2024-07-12 17:20:29 +01:00
parent b678e26281
commit 02c3c4b8a0

View file

@ -669,7 +669,7 @@ class Coder:
def check_for_urls(self, inp): def check_for_urls(self, inp):
url_pattern = re.compile( url_pattern = re.compile(
r"http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\\(\\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+" r"(https?://[^\s/$.?#].[^\s]*)"
) )
urls = url_pattern.findall(inp) urls = url_pattern.findall(inp)
for url in urls: for url in urls: