refactor: strip trailing punctuation from URLs before displaying

This commit is contained in:
Paul Gauthier (aider) 2024-10-31 14:03:27 -07:00
parent 94c5ff2fd2
commit 750b12282f

View file

@ -797,8 +797,7 @@ class Coder:
urls = list(set(url_pattern.findall(text))) # Use set to remove duplicates
for url in urls:
dump(url)
#ai strip all trailing .', from url!
if self.io.confirm_ask("Open URL for more info about this error?", subject=url):
if self.io.confirm_ask("Open URL for more info about this error?", subject=url.rstrip(".',")):
webbrowser.open(url)
return urls