diff --git a/packages/web/src/javascripts/Components/SuperEditor/Plugins/ItemSelectionPlugin/useTypeaheadAllowingSpacesAndPunctuation.tsx b/packages/web/src/javascripts/Components/SuperEditor/Plugins/ItemSelectionPlugin/useTypeaheadAllowingSpacesAndPunctuation.tsx index 8a601dcf4..2c24b6219 100644 --- a/packages/web/src/javascripts/Components/SuperEditor/Plugins/ItemSelectionPlugin/useTypeaheadAllowingSpacesAndPunctuation.tsx +++ b/packages/web/src/javascripts/Components/SuperEditor/Plugins/ItemSelectionPlugin/useTypeaheadAllowingSpacesAndPunctuation.tsx @@ -20,7 +20,7 @@ export function useTypeaheadAllowingSpacesAndPunctuation( (text: string) => { const validChars = '[^' + trigger + ']' const TypeaheadTriggerRegex = new RegExp( - '(^|\\s|\\()(' + '[' + trigger + ']' + '((?:' + validChars + '){0,' + maxLength + '})' + ')$', + '(^|\\s|\\()(' + '[' + trigger + ']' + '(\\S(?:' + validChars + '){0,' + maxLength + '})' + ')$', ) const match = TypeaheadTriggerRegex.exec(text) if (match !== null) {