# URL auto-linking doesn't hyperlink if open paren precedes the protocol

**URL:** https://meta.discourse.org/t/url-auto-linking-doesnt-hyperlink-if-open-paren-precedes-the-protocol/33630
**Category:** Feature
**Tags:** markdown-it-review
**Created:** [9월 23, 2015, 9:06오전 UTC](https://meta.discourse.org/t/url-auto-linking-doesnt-hyperlink-if-open-paren-precedes-the-protocol/33630 "2015-09-23T09:06:02Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![dandv](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dandv/32/169779_2.png) [@dandv](https://meta.discourse.org/u/dandv)
#### Post date: [9월 23, 2015, 9:06오전 UTC](https://meta.discourse.org/t/url-auto-linking-doesnt-hyperlink-if-open-paren-precedes-the-protocol/33630/1 "2015-09-23T09:06:02Z")

</div>

Input:

`The Discourse forum (http://discourse.org) rocks.`

Expected output:

The Discourse forum ([http://discourse.org](http://discourse.org)) rocks.

Actual output:

The Discourse forum ([http://discourse.org](http://discourse.org)) rocks.

---

<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: [9월 23, 2015, 11:11오전 UTC](https://meta.discourse.org/t/url-auto-linking-doesnt-hyperlink-if-open-paren-precedes-the-protocol/33630/2 "2015-09-23T11:11:26Z")

</div>

Bug? LOL, nope.

[http://johnmacfarlane.net/babelmark2/?normalize=1&text=What+(http%3A%2F%2Fexample.com)+Happens%3F](http://johnmacfarlane.net/babelmark2/?normalize=1&text=What+(http%3A%2F%2Fexample.com)+Happens%3F)

Depends if you believe [the Minority Report](https://en.wikipedia.org/wiki/The_Minority_Report).

---

<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: [9월 23, 2015, 11:51오전 UTC](https://meta.discourse.org/t/url-auto-linking-doesnt-hyperlink-if-open-paren-precedes-the-protocol/33630/3 "2015-09-23T11:51:42Z")

</div>

Markdown it linkify handles this fine: [https://markdown-it.github.io/](https://markdown-it.github.io/)

We will be moving to it

---

<div class="post-metadata">

### Author: ![dandv](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dandv/32/169779_2.png) [@dandv](https://meta.discourse.org/u/dandv)
#### Post date: [9월 23, 2015, 10:20오후 UTC](https://meta.discourse.org/t/url-auto-linking-doesnt-hyperlink-if-open-paren-precedes-the-protocol/33630/4 "2015-09-23T22:20:40Z")

</div>

StackOverflow’s markdown parser does hyperlink ([http://example.com](http://example.com)).

FWIW, I looked into the best libraries for the job in Feb '14:

> <https://stackoverflow.com/questions/37684/how-to-replace-plain-urls-with-links/21925491#21925491>

---

<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: [9월 23, 2015, 10:25오후 UTC](https://meta.discourse.org/t/url-auto-linking-doesnt-hyperlink-if-open-paren-precedes-the-protocol/33630/5 "2015-09-23T22:25:53Z")

</div>

Im telling the regex there is hellish, we are just gonna have to wait on the Markdown move it solves this.

[https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/dialects/autolink\_dialect.js#L6](https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/dialects/autolink_dialect.js#L6)

---

<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: [6월 26, 2017, 8:07오후 UTC](https://meta.discourse.org/t/url-auto-linking-doesnt-hyperlink-if-open-paren-precedes-the-protocol/33630/6 "2017-06-26T20:07:04Z")

</div>

And … ([GitHub - markdown-it/markdown-it: Markdown parser, done right. 100% CommonMark support, extensions, syntax plugins & high speed · GitHub](https://github.com/markdown-it/markdown-it)) really does rock 🥁

Working now!

> [@CommonMark testing started here!](https://meta.discourse.org/t/commonmark-testing-started-here/65121):
>
> Per our [migration plans](https://meta.discourse.org/t/discourse-commonmark-migration-plans-confetti-ball-balloon), I just enabled [markdown.it](https://github.com/markdown-it/markdown-it) at Meta. It is an excellent [CommonMark](http://commonmark.org/) compliant engine. I expect quite a few edges to be found during this period of testing. Do not open bugs about the new Engine, just reply here. I/we will be updating the top post here with the list of issues and striking out stuff as it is fixed. Current known issues (to be fixed)white_check_mark Onebox vanishes after you start typing and works not-super consistently white_check_mark pending…

---

<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: [6월 26, 2017, 8:07오후 UTC](https://meta.discourse.org/t/url-auto-linking-doesnt-hyperlink-if-open-paren-precedes-the-protocol/33630/7 "2017-06-26T20:07:07Z")

</div>


