test: add debug dump of URL pattern regex

This commit is contained in:
Paul Gauthier 2024-10-31 14:02:05 -07:00 committed by Paul Gauthier (aider)
parent 15c62e3e43
commit 85ad2826da

View file

@ -794,6 +794,7 @@ class Coder:
"""Check text for URLs and offer to open them in a browser."""
url_pattern = re.compile(r"(https?://[^\s/$.?#].[^\s]*?)([.']*$|[.',\s])")
dump(url_pattern)
# ai strip trailing . or ' from the url!
urls = list(set(url_pattern.findall(text))) # Use set to remove duplicates