amethyst icon indicating copy to clipboard operation
amethyst copied to clipboard

Minor bug: Text with ellipsis (...) rendered as clickable link

Open ahanniga opened this issue 2 years ago • 1 comments

Issue is illustrated below.

image

It appears that Patterns.WEB_URL allows this! Maybe this is a better regex, works for me:

(http|https):\/\/([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:\/~+#-]*[\w@?^=%&\/~+#-])

ahanniga avatar Jan 27 '23 15:01 ahanniga

It's not just ellipses, it's anything containing periods. Amethyst attempted to linkify "iris.to" (without protocol header" as well as "U.S.". See screenshots for detail. At the very least, whatever is attempting to detect URLs to linkify them should probably require a URL protocol part before deciding how to embed the URL.

Screenshot_20230130_200926_Amethyst Screenshot_20230130_012355_Amethyst

dtrammell avatar Jan 31 '23 00:01 dtrammell

Just another comment... I noticed that abbreviations such as e.g, n.b and i.e also get the link treatment. I think it's better therefore not to make assumptions about the text and use the scheme/prefix provided. After all, that's what it's there for!

ahanniga avatar Feb 06 '23 11:02 ahanniga

I believe this was fixed a few versions ago. Closing it for now

vitorpamplona avatar Aug 29 '23 20:08 vitorpamplona