mirror of
https://github.com/danog/telegram-tt.git
synced 2024-11-27 12:55:11 +01:00
Emoji Picker: Ignore colon after a word (#1078)
This commit is contained in:
parent
b5cd16643d
commit
222175cbbb
@ -14,7 +14,7 @@ let emojiDataPromise: Promise<EmojiModule>;
|
||||
let emojiRawData: EmojiRawData;
|
||||
let emojiData: EmojiData;
|
||||
|
||||
const RE_NOT_EMOJI_SEARCH = /[^-:_a-z\d]+/i;
|
||||
const RE_NOT_EMOJI_SEARCH = /[^-_:\p{L}\p{N}]+/iu;
|
||||
const EMOJIS_LIMIT = 36;
|
||||
|
||||
export default function useEmojiTooltip(
|
||||
@ -109,7 +109,7 @@ export default function useEmojiTooltip(
|
||||
|
||||
function getEmojiCode(html: string) {
|
||||
const tempEl = document.createElement('div');
|
||||
tempEl.innerHTML = html;
|
||||
tempEl.innerHTML = html.replace('<br>', '\n');
|
||||
const text = tempEl.innerText;
|
||||
|
||||
const lastSymbol = text[text.length - 1];
|
||||
|
Loading…
Reference in New Issue
Block a user