fix autolink
This commit is contained in:
parent
6abe79e6ea
commit
a25191e4d3
@ -328,14 +328,15 @@ inline.lexer = function(str) {
|
|||||||
if (cap[2] === '@') {
|
if (cap[2] === '@') {
|
||||||
var email = mangle(cap[1])
|
var email = mangle(cap[1])
|
||||||
, mailto = mangle('mailto:') + mailto;
|
, mailto = mangle('mailto:') + mailto;
|
||||||
|
out += '<a href="' + mailto + '">'
|
||||||
|
+ email
|
||||||
|
+ '</a>';
|
||||||
} else {
|
} else {
|
||||||
var href = escape(cap[1]);
|
var href = escape(cap[1]);
|
||||||
|
out += '<a href="' + href + '">'
|
||||||
|
+ href
|
||||||
|
+ '</a>';
|
||||||
}
|
}
|
||||||
out += '<a href="'
|
|
||||||
+ (mailto || href)
|
|
||||||
+ '">'
|
|
||||||
+ (email || href)
|
|
||||||
+ '</a>';
|
|
||||||
break;
|
break;
|
||||||
case 'strong':
|
case 'strong':
|
||||||
out += '<strong>'
|
out += '<strong>'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user