Commit d65695dcef118754934a0ef90c1a73cc23090b15

Lars Kappert 2013-07-25T10:45:54

Allow port number (i.e. colon) in url

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/plugins/autolinker/prism-autolinker.js b/plugins/autolinker/prism-autolinker.js
index 0d96c5c..21c1bdd 100644
--- a/plugins/autolinker/prism-autolinker.js
+++ b/plugins/autolinker/prism-autolinker.js
@@ -4,7 +4,7 @@ if (!self.Prism) {
 	return;
 }
 
-var url = /\b([a-z]{3,7}:\/\/|tel:)[\w-+%~/.]+/,
+var url = /\b([a-z]{3,7}:\/\/|tel:)[\w-+%~/.:]+/,
     email = /\b\S+@[\w.]+[a-z]{2}/,
     linkMd = /\[([^\]]+)]\(([^)]+)\)/,
     
@@ -58,4 +58,4 @@ Prism.hooks.add('wrap', function(env) {
 	}
 });
 
-})();
\ No newline at end of file
+})();