Skip to content

Commit

Permalink
Autolinker: Fixed URL regex to match more valid URLs (#3358)
Browse files Browse the repository at this point in the history
  • Loading branch information
RunDevelopment committed Mar 13, 2022
1 parent cde0b5b commit 17ed916
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion plugins/autolinker/prism-autolinker.js
Expand Up @@ -4,7 +4,7 @@
return;
}

var url = /\b([a-z]{3,7}:\/\/|tel:)[\w\-+%~/.:=&@]+(?:\?[\w\-+%~/.:=?&!$'()*,;@]*)?(?:#[\w\-+%~/.:#=?&!$'()*,;@]*)?/;
var url = /\b([a-z]{3,7}:\/\/|tel:)[\w\-+%~/.:=&!$'()*,;@]+(?:\?[\w\-+%~/.:=?&!$'()*,;@]*)?(?:#[\w\-+%~/.:#=?&!$'()*,;@]*)?/;
var email = /\b\S+@[\w.]+[a-z]{2}/;
var linkMd = /\[([^\]]+)\]\(([^)]+)\)/;

Expand Down
2 changes: 1 addition & 1 deletion plugins/autolinker/prism-autolinker.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 17ed916

Please sign in to comment.