Browse Source

bug fixed

tags/v1.1.4
Lunny Xiao 6 years ago
parent
commit
c401788383
No account linked to committer's email address
1 changed files with 7 additions and 5 deletions
  1. 7
    5
      public/js/libs/autolink.js

+ 7
- 5
public/js/libs/autolink.js View File

@@ -5,11 +5,13 @@ jQuery.fn.autolink = function() {
.each(function() {
$(this).each(function() {
if (re.test($(this).text()))
$(this).replaceWith(
$("<span />").html(
this.nodeValue.replace(re, "<a href='$1'>$1</a>")
)
);
if($(this).parents().filter('code').length === 0) {
$(this).replaceWith(
$("<span />").html(
this.nodeValue.replace(re, "<a href='$1'>$1</a>")
)
);
};
});
});
};

Loading…
Cancel
Save