lib/simple_format/auto_link.rb
def email_addresses(text)
      text.gsub(@regex[:mail]) do
        text = $&
        if auto_linked?($`, $')
          text
        else
          display_text = (block_given?) ? yield(text) : text
          # mail_to text, display_text
          "<a href='mailto:#{text}'>#{display_text}</a>"
        end
      end
    end
def email_addresses(text)
      text.gsub(@regex[:mail]) do
        text = $&
        if auto_linked?($`, $')
          text
        else
          display_text = (block_given?) ? yield(text) : text
          # mail_to text, display_text
          "<a href='mailto:#{text}'>#{display_text}</a>"
        end
      end
    end
Turns all email addresses into clickable links.  If a block is given,
 each email is yielded and the result is used as the link text.