Automatic links for mailto:

Aaron VonderHaar gruen0aermel at gmail.com
Sat Nov 6 23:21:55 EST 2004


Hi, I've just subscribed to the list, so I hope this post is appropriate.

In my use of markdown, I prefer to use <mailto:email at com.com> instead
of simply <email at com.com>.  Below is a simple patch to make markdown
handle the mailto: format (the plain method still works, though I
personally would lobby against it since it's not a real url w/out an
uri scheme :).

--Aaron VonderHaar

Index: markdown
===================================================================
--- markdown    (revision 6)
+++ markdown    (working copy)
@@ -1058,6 +1058,7 @@
        # Email addresses: <address at domain.foo>
        $text =~ s{
                <
+               (?:mailto:)?
                (
                        [-.\w]+
                        \@


More information about the Markdown-discuss mailing list