mirror of https://github.com/vector-im/riot-web
Merge pull request #3884 from matrix-org/t3chguy/emoji_space_complete
Fix emoticon space completion for upper case emoticons like :D xDpull/21833/head
commit
adec308529
|
@ -107,8 +107,9 @@ export default class BasicMessageEditor extends React.Component {
|
|||
});
|
||||
const emoticonMatch = REGEX_EMOTICON_WHITESPACE.exec(range.text);
|
||||
if (emoticonMatch) {
|
||||
const query = emoticonMatch[1].toLowerCase().replace("-", "");
|
||||
const data = EMOTICON_TO_EMOJI.get(query);
|
||||
const query = emoticonMatch[1].replace("-", "");
|
||||
// try both exact match and lower-case, this means that xd won't match xD but :P will match :p
|
||||
const data = EMOTICON_TO_EMOJI.get(query) || EMOTICON_TO_EMOJI.get(query.toLowerCase());
|
||||
|
||||
if (data) {
|
||||
const {partCreator} = model;
|
||||
|
|
Loading…
Reference in New Issue