update hyperdown

This commit is contained in:
joyqi 2021-08-19 15:56:42 +08:00
parent 24bd3ab367
commit efc5bf5c51
3 changed files with 366 additions and 318 deletions

File diff suppressed because one or more lines are too long

View File

@ -287,7 +287,7 @@
text = this.parseInlineCallback(text);
// autolink url
if (enableAutoLink) {
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, (...matches) => {
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, (...matches) => {
var link, url;
url = this.cleanUrl(matches[2]);
link = this.call('parseLink', matches[2]);

File diff suppressed because it is too large Load Diff