Skip to content

Commit 90091da

Browse files
author
joyboyguo
committed
fix: use iOS-compatible regex for autolink parsing
1 parent ba83f42 commit 90091da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ function transformGfmAutolinkLiterals(tree) {
132132
tree,
133133
[
134134
[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi, findUrl],
135-
[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu, findEmail]
135+
[/(?:^|\s|[!"#$%&'()*+,\-./:;<=>?@[\\]^_`{|}~])([-.\\w+]+)@([-\w]+(?:\.[-\w]+)+)/gi, findEmail]
136136
],
137137
{ignore: ['link', 'linkReference']}
138138
)

0 commit comments

Comments
 (0)