update hyperdown
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -407,7 +407,7 @@
|
||||
})(this));
|
||||
text = this.parseInlineCallback(text);
|
||||
if (enableAutoLink) {
|
||||
text = text.replace(/(^|[^\"])(https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&\/=]*)|(?:mailto:)?[_a-z0-9-\.\+]+@[_\w-]+\.[a-z]{2,})($|[^\"])/g, (function(_this) {
|
||||
text = text.replace(/(^|[^\"])(https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\b([-a-zA-Z0-9()@:%_\+.~#?&\/=]*)|(?:mailto:)?[_a-z0-9-\.\+]+@[_\w-]+\.[a-z]{2,})($|[^\"])/g, (function(_this) {
|
||||
return function() {
|
||||
var link, matches, url;
|
||||
matches = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
||||
|
||||
+1
-1
@@ -541,7 +541,7 @@ class HyperDown
|
||||
// autolink url
|
||||
if ($enableAutoLink) {
|
||||
$text = preg_replace_callback(
|
||||
"/(^|[^\"])(https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&\/=]*)|(?:mailto:)?[_a-z0-9-\.\+]+@[_\w-]+\.[a-z]{2,})($|[^\"])/",
|
||||
"/(^|[^\"])(https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\b([-a-zA-Z0-9()@:%_\+.~#?&\/=]*)|(?:mailto:)?[_a-z0-9-\.\+]+@[_\w-]+\.[a-z]{2,})($|[^\"])/",
|
||||
function ($matches) use ($self) {
|
||||
$url = $self->cleanUrl($matches[2]);
|
||||
$link = $self->call('parseLink', $matches[2]);
|
||||
|
||||
Reference in New Issue
Block a user