Prevent user pills containing only emoji from embiggening

This commit is contained in:
Andrew Morgan 2019-04-10 18:00:04 +01:00
parent 6c8b93049d
commit a77c3d4d9b

View File

@ -516,7 +516,10 @@ export function bodyToHtml(content, highlights, opts={}) {
contentBodyTrimmed = contentBodyTrimmed.replace(ZWJ_REGEX, '');
const match = EMOJI_REGEX.exec(contentBodyTrimmed);
emojiBody = match && match[0] && match[0].length === contentBodyTrimmed.length;
emojiBody = match && match[0] && match[0].length === contentBodyTrimmed.length
// Prevent user pills expanding for users with only emoji in
// their username
&& content.formatted_body == undefined;
}
const className = classNames({