mirror of https://github.com/vector-im/riot-web
feat: improve emoji-body detection
parent
6a133bc034
commit
a9a3d31b3f
|
@ -217,8 +217,9 @@ module.exports = {
|
||||||
}
|
}
|
||||||
|
|
||||||
EMOJI_REGEX.lastIndex = 0;
|
EMOJI_REGEX.lastIndex = 0;
|
||||||
let match = EMOJI_REGEX.exec(body);
|
let contentBodyTrimmed = content.body.trim();
|
||||||
let emojiBody = match && match[0] && match[0].length === body.length;
|
let match = EMOJI_REGEX.exec(contentBodyTrimmed);
|
||||||
|
let emojiBody = match && match[0] && match[0].length === contentBodyTrimmed.length;
|
||||||
|
|
||||||
let className = classNames('markdown-body', {
|
let className = classNames('markdown-body', {
|
||||||
'emoji-body': emojiBody,
|
'emoji-body': emojiBody,
|
||||||
|
|
Loading…
Reference in New Issue