mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 21:13:50 +00:00
fix: Add patch for mdast-util-gfm-autolink-literal@2.0.1 (#4479)
Compatibility patch for Safari versions below 16.4
This commit is contained in:
13
patches/mdast-util-gfm-autolink-literal@2.0.1.patch
Normal file
13
patches/mdast-util-gfm-autolink-literal@2.0.1.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
diff --git a/lib/index.js b/lib/index.js
|
||||
index c5ca771c24dd914e342f791716a822431ee32b3a..9e9dc090d4be5cf882316ed2eced4c471c40407b 100644
|
||||
--- a/lib/index.js
|
||||
+++ b/lib/index.js
|
||||
@@ -132,7 +132,7 @@ function transformGfmAutolinkLiterals(tree) {
|
||||
tree,
|
||||
[
|
||||
[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi, findUrl],
|
||||
- [/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu, findEmail]
|
||||
+ [/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g, findEmail]
|
||||
],
|
||||
{ignore: ['link', 'linkReference']}
|
||||
)
|
Reference in New Issue
Block a user