mirror of https://github.com/vector-im/riot-web
update emoji provider regex
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>pull/21833/head
parent
93884cb89b
commit
0075ae2187
|
@ -34,7 +34,8 @@ import EMOTICON_REGEX from 'emojibase-regex/emoticon';
|
|||
const LIMIT = 20;
|
||||
|
||||
// Match for ascii-style ";-)" emoticons or ":wink:" shortcodes provided by emojibase
|
||||
const EMOJI_REGEX = new RegExp('(' + EMOTICON_REGEX.source + '|:[+-\\w]*:?)$', 'g');
|
||||
// anchored to only match from the start of parts otherwise it'll show emoji suggestions whilst typing matrix IDs
|
||||
const EMOJI_REGEX = new RegExp('(' + EMOTICON_REGEX.source + '|(?:^|\\s):[+-\\w]*:?)$', 'g');
|
||||
|
||||
interface IEmojiShort {
|
||||
emoji: IEmoji;
|
||||
|
|
Loading…
Reference in New Issue