Fixed url parsing regexp in Prism grammar. Fixed #634
This commit is contained in:
parent
8802ec82d4
commit
4c7cb8c0a4
@ -1,7 +1,7 @@
|
||||
Prism.languages.md = (function() {
|
||||
|
||||
var charInsideUrl = "[-A-Z0-9+&@#/%?=~_|[\\]()!:,.;]",
|
||||
charEndingUrl = "[-A-Z0-9+&@#/%=~_|[\\])]";
|
||||
var charInsideUrl = "(&|[-A-Z0-9+@#/%?=~_|[\\]()!:,.;])",
|
||||
charEndingUrl = "(&|[-A-Z0-9+@#/%=~_|[\\])])";
|
||||
var urlPattern = new RegExp("(https?|ftp)(://" + charInsideUrl + "*" + charEndingUrl + ")(?=$|\\W)", "gi");
|
||||
var emailPattern = /(?:mailto:)?([-.\w]+\@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)/gi;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user