mirror of
https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-11-09 20:07:43 +08:00
15 lines
666 B
Diff
15 lines
666 B
Diff
diff --git a/lib/index.js b/lib/index.js
|
||
index c5ca771c24dd914e342f791716a822431ee32b3a..11265b3fe41bb41985f149e2bd8f2fc2b6f85e2e 100644
|
||
--- a/lib/index.js
|
||
+++ b/lib/index.js
|
||
@@ -131,7 +131,8 @@ function transformGfmAutolinkLiterals(tree) {
|
||
findAndReplace(
|
||
tree,
|
||
[
|
||
- [/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi, findUrl],
|
||
+ // Non-ASCII punctuation and symbols, such as `。` or `,`, end the path in CJK prose.
|
||
+ [/(https?:\/\/|www(?=\.))([-.\w]+)((?:[!-~]|(?![\p{P}\p{S}])[^ \t\r\n])*)/giu, findUrl],
|
||
[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu, findEmail]
|
||
],
|
||
{ignore: ['link', 'linkReference']}
|