Links in parentheses are not hyperlinked

markdown-it-review

(Scott Trager) #1

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.


(Jeff Atwood) #2

Let’s see

http://www.example.com

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


(Sam Saffron) #3

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


(Jeff Atwood) #4

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


(Sam Saffron) #5

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


(Kane York) #6

I think this is part of the problem.


(Sam Saffron) #7

is another part of the problem.


(Dave McClure) #8

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


(Joshua Rosenfeld) #9

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)


(Dave McClure) #10

(RĂ©gis Hanol) #11