redcarpet icon indicating copy to clipboard operation
redcarpet copied to clipboard

autolink for email doesn't work with underscores

Open joelr opened this issue 10 years ago • 9 comments

Currently [email protected] will autolink to [email protected]

Also this is when escaping markdown of course, so abc\_def\[email protected]

any thoughts?

joelr avatar Jul 14 '14 05:07 joelr

There's something very wrong here...

Redcarpet::Markdown.new(Redcarpet::Render::HTML.new, autolink: true).render("[email protected]")
=> "<p>my<em>s<a href=\"mailto:[email protected]\">[email protected]</a></p>\n"

jacobat avatar Oct 28 '14 10:10 jacobat

I got the same error, it mistook the _ in emphasis and _ in the links

thethanghn avatar Dec 29 '14 04:12 thethanghn

Emphasis underscores should only activate if they are next to a space, and not in_the_middle of a word. This bug goes back a long time!

courtenay avatar Feb 09 '15 18:02 courtenay

(looks like github flavored markdown doesn't have that problem)

courtenay avatar Feb 09 '15 18:02 courtenay

+1

marius-balteanu avatar Jun 06 '17 08:06 marius-balteanu

+1

efedasz avatar Dec 19 '17 10:12 efedasz

+1

8vius avatar Jan 22 '18 18:01 8vius

+1

matthutchinson avatar Aug 26 '21 13:08 matthutchinson

+1

yheuhtozr avatar Dec 08 '22 16:12 yheuhtozr