Skip to content

Commit b02cdaf

Browse files
committed
1 parent dc059a5 commit b02cdaf

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ function transformGfmAutolinkLiterals(tree) {
9191
findAndReplace(
9292
tree,
9393
[
94-
[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/i, findUrl],
95-
[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/, findEmail]
94+
[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi, findUrl],
95+
[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g, findEmail]
9696
],
9797
{ignore: ['link', 'linkReference']}
9898
)

test/algorithm-2e.html

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<p>[ <a href="https://example.com">https://example.com</a>
2+
[ <a href="https://example.com">https://example.com</a>
3+
<a href="https://example.com">https://example.com</a>
4+
<a href="https://example.com">https://example.com</a></p>

test/algorithm-2e.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[ https&#x3A;//example.com
2+
[ https://example.com
3+
https&#x3A;//example.com
4+
https://example.com

0 commit comments

Comments
 (0)