handle mailto differently

This commit is contained in:
Christopher Jeffrey 2011-09-14 12:16:38 -05:00
parent 8bf75598ff
commit 263e0d4f25

View File

@ -312,7 +312,9 @@ inline.lexer = function(str) {
break; break;
case 'autolink': case 'autolink':
if (cap[2] === '@') { if (cap[2] === '@') {
text = mangle(cap[1].split(':').pop()); text = cap[1][6] === ':'
? mangle(cap[1].substring(7))
: mangle(cap[1]);
href = mangle('mailto:') + text; href = mangle('mailto:') + text;
} else { } else {
text = escape(cap[1]); text = escape(cap[1]);