We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f4c0e75 commit 9bb3371Copy full SHA for 9bb3371
lib/src/index.ts
@@ -1,5 +1,7 @@
1
export const autoLinkMd = (str: string) =>
2
- str.replace(
3
- /(ftp|https?):\/\/[\w_-]+(\.[\w_-]+)+[\w@?^=%&/~+#-.:,]*[\w@?^=%&/~+#-]|[\w._%+-]+@[\w.-]+\.[a-zA-Z]{2,}/g,
4
- match => `<${match}>`,
5
- );
+ str
+ .replace(
+ /(ftp|https?):\/\/[\w_-]+(\.[\w_-]+)+[\w@?^=%&/~+#-.:,]*[\w@?^=%&/~+#-]/g,
+ match => `<${match}>`,
6
+ )
7
+ .replace(/[\w._%+-]+@[\w.-]+\.[a-zA-Z]{2,}/g, match => `<${match}>`);
0 commit comments