Forum: Ruby Textilize and Markdown and URLs

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
C618e1d9ffa1bd1a6b6edc8ad4edec63?d=identicon&s=25 Robert C. Mannl (Guest)
on 2006-01-26 23:18
(Received via mailing list)
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, but I can't just write 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
6ec6f77ea603dd75b3a7a7775b059e79?d=identicon&s=25 John W. Long (Guest)
on 2006-01-27 00:33
(Received via mailing list)
> 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/Help...

I noticed this today while reading through the docs on helper methods.
There were quite a few I didn't know about.
Bc6d88907ce09158581fbb9b469a35a3?d=identicon&s=25 James Britt (Guest)
on 2006-01-27 01:42
(Received via mailing list)
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:
>
> http://api.rubyonrails.com/classes/ActionView/Help...
>

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

Seems there would be a simpler way.


James
C618e1d9ffa1bd1a6b6edc8ad4edec63?d=identicon&s=25 Robert C. Mannl (Guest)
on 2006-01-27 09:54
(Received via mailing list)
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
230ccd9aa66613ac4515ff5861b4c5af?d=identicon&s=25 Gabe Boyer (Guest)
on 2006-01-27 22:41
(Received via mailing list)
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
This topic is locked and can not be replied to.