mirror of https://github.com/langgenius/dify.git
fix: prompt-editor
This commit is contained in:
parent
d48bdf3e14
commit
459b690416
|
|
@ -158,9 +158,9 @@ export function useBasicTypeaheadTriggerMatch(
|
|||
): TriggerFn {
|
||||
return useCallback(
|
||||
(text: string) => {
|
||||
const validChars = `[^${trigger}${PUNCTUATION}\\s]`
|
||||
const validChars = `[${PUNCTUATION}\\s]`
|
||||
const TypeaheadTriggerRegex = new RegExp(
|
||||
`([^${trigger}]|^)(`
|
||||
'(.*)('
|
||||
+ `[${trigger}]`
|
||||
+ `((?:${validChars}){0,${maxLength}})`
|
||||
+ ')$',
|
||||
|
|
|
|||
Loading…
Reference in New Issue