bug fixed
This commit is contained in:
parent
8335b556d1
commit
c401788383
1 changed files with 7 additions and 5 deletions
|
@ -5,11 +5,13 @@ jQuery.fn.autolink = function() {
|
||||||
.each(function() {
|
.each(function() {
|
||||||
$(this).each(function() {
|
$(this).each(function() {
|
||||||
if (re.test($(this).text()))
|
if (re.test($(this).text()))
|
||||||
|
if($(this).parents().filter('code').length === 0) {
|
||||||
$(this).replaceWith(
|
$(this).replaceWith(
|
||||||
$("<span />").html(
|
$("<span />").html(
|
||||||
this.nodeValue.replace(re, "<a href='$1'>$1</a>")
|
this.nodeValue.replace(re, "<a href='$1'>$1</a>")
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
};
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
Reference in a new issue