Skip to content

Commit 9bb3371

Browse files
committed
check codeql analysis
1 parent f4c0e75 commit 9bb3371

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lib/src/index.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
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-
);
2+
str
3+
.replace(
4+
/(ftp|https?):\/\/[\w_-]+(\.[\w_-]+)+[\w@?^=%&/~+#-.:,]*[\w@?^=%&/~+#-]/g,
5+
match => `<${match}>`,
6+
)
7+
.replace(/[\w._%+-]+@[\w.-]+\.[a-zA-Z]{2,}/g, match => `<${match}>`);

0 commit comments

Comments
 (0)