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
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
I noticed this today while reading through the docs on helper methods.
There were quite a few I didn’t know about.
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
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
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
Install Rails just to get RedCloth or BlueCloth to link some text?
Seems there would be a simpler way.
James