First time here? Check out the FAQ!
2

Auto link urls please

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.

Evgeny's avatar
13.2k
Evgeny
updated 2010-12-10 20:56:50 -0600
graeme's avatar
319
graeme
asked 2010-11-24 04:57:50 -0600
edit flag offensive 0 remove flag close merge delete

Comments

Thanks. I'll definitely look into it.
Evgeny's avatar Evgeny (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's avatar niles (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's avatar Evgeny (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's avatar graeme (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's avatar Evgeny (2010-12-03 21:59:47 -0600) edit
add a comment see more comments

1 Answer

1

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

Evgeny's avatar
13.2k
Evgeny
updated 2010-12-11 19:02:49 -0600, answered 2010-12-10 20:56:12 -0600
edit flag offensive 0 remove flag delete link

Comments

awesome!! thanks :)
niles's avatar niles (2010-12-15 08:41:15 -0600) edit
Works fine. Does not work in the preview, but that does not matter.
graeme's avatar graeme (2011-01-19 02:44:33 -0600) edit
add a comment see more comments