mirror of
https://github.com/vector-im/element-web.git
synced 2025-08-30 10:51:13 +02:00
Allow emoji presentation selector to not break BigEmoji styling (#11253)
* Allow emoji presentation selector to not break BigEmoji styling * Tweak regex to make sonar & lint happy
This commit is contained in:
parent
46c12a808f
commit
e6550a33b6
@ -52,8 +52,9 @@ const SURROGATE_PAIR_PATTERN = /([\ud800-\udbff])([\udc00-\udfff])/;
|
||||
// (with plenty of false positives, but that's OK)
|
||||
const SYMBOL_PATTERN = /([\u2100-\u2bff])/;
|
||||
|
||||
// Regex pattern for non-emoji characters that can appear in an "all-emoji" message (Zero-Width Joiner, Zero-Width Space, other whitespace)
|
||||
const EMOJI_SEPARATOR_REGEX = /[\u200D\u200B\s]/g;
|
||||
// Regex pattern for non-emoji characters that can appear in an "all-emoji" message
|
||||
// (Zero-Width Joiner, Zero-Width Space, Emoji presentation character, other whitespace)
|
||||
const EMOJI_SEPARATOR_REGEX = /[\u200D\u200B\s]|\uFE0F/g;
|
||||
|
||||
const BIGEMOJI_REGEX = new RegExp(`^(${EMOJIBASE_REGEX.source})+$`, "i");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user