Links in parentheses are not hyperlinked

Continuing the discussion from Dealing with unwanted (and probably spam) accounts from other countries?:

I noticed when typing the comment above that links in parentheses are not hyperlinked.

2개의 좋아요

Let’s see

And (http://www.example.com) so yep, you’re right.

The autolink regex is nasty, and broken in quite a few cases

Can you post a link to the exact line of code here and I will look at it?

https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/dialects/autolink_dialect.js

It needs to deal with diff rules for domain part vs path part vs query string

2개의 좋아요

I think this is part of the problem.

is another part of the problem.

Just ran into this… It seems relatively common behavior on our site right now for people to parenthetically include links.

1개의 좋아요

Ran into this as well today. Easy enough to surround the link with <> but annoying nonetheless.

Examples:

Doesn’t work:
(http://www.example.com)
(http://www.example.com)

Works:
(<http://www.example.com>)
(http://www.example.com)

3개의 좋아요

https://github.com/discourse/discourse/pull/4523

5개의 좋아요