mirror of
https://github.com/jina-ai/node-DeepResearch.git
synced 2025-12-26 06:28:56 +08:00
fix regex issue
This commit is contained in:
parent
46ee5955d3
commit
9516ce1aa6
@ -251,5 +251,6 @@ function truncateInputString(input: string | Record<string, string>): string {
|
||||
}
|
||||
|
||||
function trimLeadingSymbols(str: string): string {
|
||||
return str.replace(/^(?:[\u{1F000}-\u{1F9FF}]|[\u{2600}-\u{27BF}]|[\u{FE00}-\u{FE0F}]|[\u{DFE5}]|\s)+/gu, '');
|
||||
const regex = /^[\p{S}\p{P}\p{Z}\p{C}\p{Emoji}]+/u;
|
||||
return str.replace(regex, '');
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user