# Links in parentheses are not hyperlinked

**URL:** https://meta.discourse.org/t/links-in-parentheses-are-not-hyperlinked/24121
**Category:** Bug
**Tags:** markdown-it-review
**Created:** [January 17, 2015, 5:26am UTC](https://meta.discourse.org/t/links-in-parentheses-are-not-hyperlinked/24121 "2015-01-17T05:26:35Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![strager](https://avatars.discourse-cdn.com/v4/letter/s/e99b99/32.png) [@strager](https://meta.discourse.org/u/strager)
#### Post date: [January 17, 2015, 5:26am UTC](https://meta.discourse.org/t/links-in-parentheses-are-not-hyperlinked/24121/1 "2015-01-17T05:26:35Z")

</div>

Continuing the discussion from [Dealing with unwanted (and probably spam) accounts from other countries?](https://meta.discourse.org/t/dealing-with-unwanted-and-probably-spam-accounts-from-other-countries/24050/28):

> [@Dealing with unwanted (and probably spam) accounts via SSO?](https://meta.discourse.org/t/dealing-with-unwanted-and-probably-spam-accounts-via-sso/24050/28):
>
> Since you are SSOing (is that a word?) through WP, you might want to add a Captcha to your login. It is really effective against that kind of automated bot. I’d try the new one by Google **([https://www.google.com/recaptcha/intro/index.html](https://www.google.com/recaptcha/intro/index.html))** first as it only requires a code if it thinks you may be a bot.

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

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [January 17, 2015, 8:45am UTC](https://meta.discourse.org/t/links-in-parentheses-are-not-hyperlinked/24121/2 "2015-01-17T08:45:05Z")

</div>

Let’s see

> **[Example Domain](http://www.example.com)**

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

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [January 27, 2015, 12:22am UTC](https://meta.discourse.org/t/links-in-parentheses-are-not-hyperlinked/24121/3 "2015-01-27T00:22:03Z")

</div>

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

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [January 27, 2015, 12:23am UTC](https://meta.discourse.org/t/links-in-parentheses-are-not-hyperlinked/24121/4 "2015-01-27T00:23:09Z")

</div>

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

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [January 27, 2015, 12:29am UTC](https://meta.discourse.org/t/links-in-parentheses-are-not-hyperlinked/24121/5 "2015-01-27T00:29:00Z")

</div>

[https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/dialects/autolink\_dialect.js](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

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [January 27, 2015, 1:22am UTC](https://meta.discourse.org/t/links-in-parentheses-are-not-hyperlinked/24121/6 "2015-01-27T01:22:03Z")

</div>

> [@sam](#):
>
> // If we improperly caught a markdown link abort  
> if (url.match(/\(http/)) { return; }

I think this is part of the problem.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [January 27, 2015, 1:27am UTC](https://meta.discourse.org/t/links-in-parentheses-are-not-hyperlinked/24121/7 "2015-01-27T01:27:40Z")

</div>

> [@sam](#):
>
> spaceOrTagBoundary

is another part of the problem.

---

<div class="post-metadata">

### Author: ![mcwumbly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcwumbly/32/103861_2.png) [@mcwumbly](https://meta.discourse.org/u/mcwumbly)
#### Post date: [September 1, 2016, 1:43pm UTC](https://meta.discourse.org/t/links-in-parentheses-are-not-hyperlinked/24121/8 "2016-09-01T13:43:06Z")

</div>

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

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [September 2, 2016, 3:46am UTC](https://meta.discourse.org/t/links-in-parentheses-are-not-hyperlinked/24121/9 "2016-09-02T03:46:08Z")

</div>

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](http://www.example.com))

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

---

<div class="post-metadata">

### Author: ![mcwumbly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcwumbly/32/103861_2.png) [@mcwumbly](https://meta.discourse.org/u/mcwumbly)
#### Post date: [October 30, 2016, 12:33am UTC](https://meta.discourse.org/t/links-in-parentheses-are-not-hyperlinked/24121/10 "2016-10-30T00:33:47Z")

</div>

[https://github.com/discourse/discourse/pull/4523](https://github.com/discourse/discourse/pull/4523)

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [October 30, 2016, 9:32am UTC](https://meta.discourse.org/t/links-in-parentheses-are-not-hyperlinked/24121/11 "2016-10-30T09:32:10Z")

</div>


