Ask Your Question
2

Auto link urls please

asked 2010-11-24 04:57:50 -0600

graeme gravatar image

updated 2010-12-10 20:56:50 -0600

Evgeny gravatar image

I noticed that this has been mentioned on Ask Sage, and I have found that users of my site do not understand Mardkown. Mostly, this does not matter, but they do need to link to things, and the result is lots of plain text URLs (lots is relative given that the site is new and low traffic). Auto linking would be really useful.

There are some existing solutions (I found this and this so you might not have to do it from scratch.

edit retag flag offensive close merge delete

Comments

Thanks. I'll definitely look into it.
Evgeny gravatar imageEvgeny ( 2010-11-24 11:54:39 -0600 )edit
A big +1 on this. Note that, strangely, urls like http://askbot.org are autolinked in comments
niles gravatar imageniles ( 2010-11-28 13:41:20 -0600 )edit
Hi Niles, that's because comments are not parsed with markdown, so it's much easier to deal with urls there. If there is "urlizing" in the questions and answers, it must be compatible with markdown.
Evgeny gravatar imageEvgeny ( 2010-11-28 13:59:34 -0600 )edit
The only thing I (or anyone on my site) ever uses Markdown for is to insert links. I would happily trade Markdown for auto linking - the only drawback is that the link text would always be a URL. Of course having both would be better!
graeme gravatar imagegraeme ( 2010-12-03 03:21:47 -0600 )edit
I hear you - will be done. Just don't want to switch my "brain context" from badges right now, should be done with them by Sunday the latest.
Evgeny gravatar imageEvgeny ( 2010-12-03 21:59:47 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2010-12-10 20:56:12 -0600

Evgeny gravatar image

updated 2010-12-11 19:02:49 -0600

Done hopefully, please drop a note if there are any issues. Below are some tests.

Also for the sage people I've added an autolinker to their bug tracker. A phrase "ticket #" will be interpreted as a link to the tracker.

Tests:

inline-style markdown link

footnote-style markdown link

plain text link to an image - http://img109.imageshack.us/img109/7189/sage0.png

image, hotlinked via markdown: image description

uploaded markdown image:

image description

file as uploaded attachment: folder.png

plain text url with parameters: http://ask.sagemath.org/question/10/what-is-broken-on-this-site?comment=749#comment-749

A url entered as html: example.com

edit flag offensive delete link more

Comments

awesome!! thanks :)
niles gravatar imageniles ( 2010-12-15 08:41:15 -0600 )edit
Works fine. Does not work in the preview, but that does not matter.
graeme gravatar imagegraeme ( 2011-01-19 02:44:33 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2010-11-24 04:57:50 -0600

Seen: 1,035 times

Last updated: Dec 11 '10