Skip to content

Commit 17ed916

Browse files
authoredMar 13, 2022
Autolinker: Fixed URL regex to match more valid URLs (#3358)
1 parent cde0b5b commit 17ed916

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

‎plugins/autolinker/prism-autolinker.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
return;
55
}
66

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

‎plugins/autolinker/prism-autolinker.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
Please sign in to comment.