# Textilize and Markdown and URLs

**URL:** <https://www.ruby-forum.com/t/textilize-and-markdown-and-urls/53160>\
**Category:** Ruby\
**Created:** [January 26, 2006, 11:18pm UTC](https://www.ruby-forum.com/t/textilize-and-markdown-and-urls/53160 "2006-01-26T23:18:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robert\_CSMannl](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e9bcb4/32.png) [@Robert\_CSMannl](https://www.ruby-forum.com/u/Robert_CSMannl)\
**Post date:** [January 26, 2006, 11:18pm UTC](https://www.ruby-forum.com/t/textilize-and-markdown-and-urls/53160/1 "2006-01-26T23:18:00Z")

</div>

Hi!

I’m stumped, maybe someone can explain this to me:

Neither Textilize nor Markdown seem to turn plain old URLs into links.

That is, I can use their proprietary Syntax to create a link, e.g.:  
“Google”:[http://google.com](http://google.com), but I can’t just write [http://google.com](http://google.com).  
That’ll stay unlinked text.

Any ideas why that is? This must have been a deliberate choice, but  
why it is, I can’t figure out.

I’ll probably just code a wrapper function that parses the URLs after  
markdown did it’s thing.

Thanks,

Rob

---

<div class="post-metadata">

**Author:** ![Robert\_CSMannl](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e9bcb4/32.png) [@Robert\_CSMannl](https://www.ruby-forum.com/u/Robert_CSMannl)\
**Post date:** [January 27, 2006, 12:33am UTC](https://www.ruby-forum.com/t/textilize-and-markdown-and-urls/53160/2 "2006-01-27T00:33:32Z")

</div>

> I’ll probably just code a wrapper function that parses the URLs after  
> markdown did it’s thing.

Try the auto\_link() helper method:

[http://api.rubyonrails.com/classes/ActionView/Helpers/TextHelper.html#M000426](http://api.rubyonrails.com/classes/ActionView/Helpers/TextHelper.html#M000426)

I noticed this today while reading through the docs on helper methods.  
There were quite a few I didn’t know about.

---

<div class="post-metadata">

**Author:** ![Robert\_CSMannl](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e9bcb4/32.png) [@Robert\_CSMannl](https://www.ruby-forum.com/u/Robert_CSMannl)\
**Post date:** [January 27, 2006, 9:54am UTC](https://www.ruby-forum.com/t/textilize-and-markdown-and-urls/53160/3 "2006-01-27T09:54:21Z")

</div>

I’m actually using Rails. I just asked this here because I thought  
the maintainers of those two libraries might be frequenting this ML.

I really just wondered why both RedCloth and BlueCloth don’t do that  
(turn urls into links). If anyone knows, I’m still interested to hear  
why that is.

But I’m using markdown(auto\_link(text)) now, so problem solved 🙂  
Thanks for the tip Mr Long 🙂

Rob

---

<div class="post-metadata">

**Author:** ![Robert\_CSMannl](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e9bcb4/32.png) [@Robert\_CSMannl](https://www.ruby-forum.com/u/Robert_CSMannl)\
**Post date:** [January 27, 2006, 10:41pm UTC](https://www.ruby-forum.com/t/textilize-and-markdown-and-urls/53160/4 "2006-01-27T22:41:56Z")

</div>

As far as I know, neither Textile nor Markdown specify automatically  
turning  
any URL into a link; they both require some kind of syntax to produce  
links.  
So, I would imagine that’s the reason why neither RedCloth nor BlueCloth  
auto-link.

Gabe

---

<div class="post-metadata">

**Author:** ![Robert\_CSMannl](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e9bcb4/32.png) [@Robert\_CSMannl](https://www.ruby-forum.com/u/Robert_CSMannl)\
**Post date:** [January 27, 2006, 1:42am UTC](https://www.ruby-forum.com/t/textilize-and-markdown-and-urls/53160/5 "2006-01-27T01:42:55Z")

</div>

John W. Long wrote:

> > I’ll probably just code a wrapper function that parses the URLs after  
> > markdown did it’s thing.
> 
> Try the auto\_link() helper method:
> 
> [Peak Obsession](http://api.rubyonrails.com/classes/ActionView/Helpers/TextHelper.html#M000426)

Install Rails just to get RedCloth or BlueCloth to link some text?

Seems there would be a simpler way.

James
