php-markdown icon indicating copy to clipboard operation
php-markdown copied to clipboard

Markdown of links where protocol/scheme isn't specified (a.k.a. auto-detecting urls)?

Open tim-peterson opened this issue 10 years ago • 3 comments

This has to be covered somewhere in this library's docs or issues but I'm wondering if there is an option to allow urls minus the protocol/scheme, i.e., http://, to get converted into links <a>.

Currently you have to write http://my-site.com/ to get Markdown() to convert the text to a link whereas I'd prefer just to write mysite.com.

tim-peterson avatar Jul 23 '13 16:07 tim-peterson

Writing directly a URL, even with http:// does not create a link. You need to surround it with angle brackets:

<http://example.com/>

This is as specified by the Markdown syntax document: http://daringfireball.net/projects/markdown/syntax#autolink

michelf avatar Jul 23 '13 23:07 michelf

@Michel, I'm wondering if there is an option without using brackets.

On Jul 23, 2013, at 7:42 PM, Michel Fortin [email protected] wrote:

Writing directly a URL, even with http:// does not create a link. You need to surround it with angle brackets:

http://example.com/ This is as specified by the Markdown syntax document: http://daringfireball.net/projects/markdown/syntax#autolink

— Reply to this email directly or view it on GitHub.

tim-peterson avatar Jul 23 '13 23:07 tim-peterson

Ah! No, there's no option for that.

michelf avatar Jul 24 '13 00:07 michelf