github twitter linkedin instagram email
Detect and linkify URLs in Clojure

I wanted to replace URLs in some plain text data with links. Thankfully Daring Fireball’s regex saves me from doing any hard work. I did hit an unexpected snag (though in retrospect it should have been obvious) - an href without a protocol will be treated as a relative path, so if a detected URL has no protocol one must be added.

Questions or feedback on this post? Email me at or leave a comment on my gist

Tags: code

Back to posts