diff --git a/web/patches/mdast-util-gfm-autolink-literal@2.0.1.patch b/web/patches/mdast-util-gfm-autolink-literal@2.0.1.patch index b91eb030..2ccf6b95 100644 --- a/web/patches/mdast-util-gfm-autolink-literal@2.0.1.patch +++ b/web/patches/mdast-util-gfm-autolink-literal@2.0.1.patch @@ -1,16 +1,12 @@ +diff --git a/lib/index.js b/lib/index.js +index c5ca771c24dd914e342f791716a822431ee32b3a..28d026e1268d0f8c14b952eabd2356e679fc56e8 100644 --- a/lib/index.js +++ b/lib/index.js -@@ -132,7 +132,13 @@ +@@ -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] -+ // NOTE(acecode): lookbehind removed for legacy WebKit compatibility. -+ // Safari < 16.4 engines (e.g. the WKWebView on macOS 12) cannot compile -+ // lookbehind, and one failing regex literal makes the whole module fail -+ // to parse. `findEmail` re-validates the preceding character at runtime -+ // via `previous(match, true)`, so dropping the assertion is -+ // behavior-neutral. + [/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu, findEmail] ], {ignore: ['link', 'linkReference']} diff --git a/web/pnpm-lock.yaml b/web/pnpm-lock.yaml index 3f83779b..9bc291e1 100644 --- a/web/pnpm-lock.yaml +++ b/web/pnpm-lock.yaml @@ -6,7 +6,7 @@ settings: patchedDependencies: mdast-util-gfm-autolink-literal@2.0.1: - hash: a4be58f34b7da3fdec4394752c5654c599ce2acd0797b32b986c8eb6fcac30c7 + hash: 7d05c063edd5df7df4a82c33bbc8bed9dcfac9e332d549dea717ceac0b4c713b path: patches/mdast-util-gfm-autolink-literal@2.0.1.patch importers: @@ -3603,7 +3603,7 @@ snapshots: transitivePeerDependencies: - supports-color - mdast-util-gfm-autolink-literal@2.0.1(patch_hash=a4be58f34b7da3fdec4394752c5654c599ce2acd0797b32b986c8eb6fcac30c7): + mdast-util-gfm-autolink-literal@2.0.1(patch_hash=7d05c063edd5df7df4a82c33bbc8bed9dcfac9e332d549dea717ceac0b4c713b): dependencies: '@types/mdast': 4.0.4 ccount: 2.0.1 @@ -3651,7 +3651,7 @@ snapshots: mdast-util-gfm@3.1.0: dependencies: mdast-util-from-markdown: 2.0.3 - mdast-util-gfm-autolink-literal: 2.0.1(patch_hash=a4be58f34b7da3fdec4394752c5654c599ce2acd0797b32b986c8eb6fcac30c7) + mdast-util-gfm-autolink-literal: 2.0.1(patch_hash=7d05c063edd5df7df4a82c33bbc8bed9dcfac9e332d549dea717ceac0b4c713b) mdast-util-gfm-footnote: 2.1.0 mdast-util-gfm-strikethrough: 2.0.0 mdast-util-gfm-table: 2.0.0