You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-07 10:46:24 +03:00
Allow diplayed reaction values to contain anything
Part of https://github.com/vector-im/riot-web/issues/10256
This commit is contained in:
@@ -66,19 +66,10 @@ const VARIATION_SELECTOR = String.fromCharCode(0xFE0F);
|
||||
* need emojification.
|
||||
* unicodeToImage uses this function.
|
||||
*/
|
||||
export function mightContainEmoji(str) {
|
||||
function mightContainEmoji(str) {
|
||||
return SURROGATE_PAIR_PATTERN.test(str) || SYMBOL_PATTERN.test(str);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the string definitely contains a single emoji.
|
||||
* @param {String} str String to test
|
||||
* @return {Boolean}
|
||||
*/
|
||||
export function isSingleEmoji(str) {
|
||||
return mightContainEmoji(str) && SINGLE_EMOJI_REGEX.test(str);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the shortcode for an emoji character.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user