redcarpet
redcarpet copied to clipboard
autolink for email doesn't work with underscores
Currently
[email protected]
will autolink to [email protected]
Also this is when escaping markdown of course, so abc\_def\[email protected]
any thoughts?
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"
I got the same error, it mistook the _ in emphasis and _ in the links
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!
(looks like github flavored markdown doesn't have that problem)
+1
+1
+1
+1
+1