[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Textilize and Markdown and URLs

Robert C. Mannl

1/26/2006 10:15:00 PM

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://..., but I can't just write http://....
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


7 Answers

John W. Long

1/26/2006 11:32:00 PM

0

> 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.ht...

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

--
John Long
http://wiseheart...


james_b

1/27/2006 12:41:00 AM

0

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/Helpers/TextHelper.ht...
>

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

Seems there would be a simpler way.


James



Robert C. Mannl

1/27/2006 8:52:00 AM

0

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


> 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/ActionVie...
>> TextHelper.html#M000426
>
> Install Rails just to get RedCloth or BlueCloth to link some text?
>
> Seems there would be a simpler way.
>
>
> James
>
>



Gabe Boyer

1/27/2006 9:41:00 PM

0

Ian Amuhton

1/27/2006 10:16:00 PM

0

Robert C. Mannl wrote:
> 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://..., but I can't just write http://....
> That'll stay unlinked text.

Don't know about Textile, but Markdown understands the "angle-bracket
convention" of writing URLs in emails, i.e. http://... will give
you an html `<a href=...`. Leaving out the angle-brackets leaves it as
a naked URL.

--
da
~~


Ian Amuhton

1/27/2006 10:19:00 PM

0

I wrote:
> Robert C. Mannl wrote:
>> 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://..., but I can't just write http://....
>> That'll stay unlinked text.

> Don't know about Textile, but Markdown understands the "angle-bracket
> convention" of writing URLs in emails, i.e. http://... will
> give you an html `<a href=...`. Leaving out the angle-brackets
> leaves it as a naked URL.

Aghh, newsreaders. That link above was typed in as
[angle-bracket]http://...[/angle-bracket], but this brain-dead
newsreader thought it knew better what I wanted and changed it.

How about

< http://... >

(but remove the spaces before and after the URL).

--
da
~~


The Peeler

6/29/2013 8:18:00 PM

0

On Sat, 29 Jun 2013 12:04:36 -0700, The Rectum, the resident psychopath of
sci and scj, FAKING his time zone again and IMPERSONATING his master, The
Peeler, wrote:

>> >> >> Still or not still, you've LEARNED something, little idiot! That's what
>> >> >> counts! <G>
>> >> >
>> >> > IT, DOES The Grik anus! <B>
>> >>
>> >> Does it, little idiot? LOL
>> >
>> > It, DOES The Grik anus! LOL
>>
>> Good for you! <BG>
>
> Good, for YOU The Grik anus! <GB>

It's primarily good for YOU when you learn something, retard! ;-)

--
tomcov about "The Rectum":
"Assholes come
Assholes go
But the revd asshole goes on forever.
(and he speaks through it)"
MID: <83356bf8-8666-4f4f-ac9a-ec5e9d5835fd@n35g2000yqf.googlegroups.com>