From 4d659f69cb67caac21bed29c3a41caa7feff92ad Mon Sep 17 00:00:00 2001 From: Ken Powers Date: Tue, 20 Aug 2019 15:45:25 -0400 Subject: [PATCH] Fix emoji autocompletion absorbing non-spaced emojis --- ts/components/CompositionInput.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts/components/CompositionInput.tsx b/ts/components/CompositionInput.tsx index cd584edb51..a524872676 100644 --- a/ts/components/CompositionInput.tsx +++ b/ts/components/CompositionInput.tsx @@ -80,7 +80,7 @@ function getWordAtIndex(str: string, index: number) { .slice(0, index + 1) .replace(/\s+$/, '') .search(/\S+$/); - const end = str.slice(index).search(/(?:\s|$)/) + index; + const end = str.slice(index).search(/(?:[^a-z0-9-_+]|$)/) + index; return { start,