Permalink
Browse files

feat: improve emoji-body detection

  • Loading branch information...
aviraldg committed Jul 5, 2016
1 parent 6a133bc commit a9a3d31b3fabe899fab57fdf9a732a691f71026e
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/HtmlUtils.js
@@ -217,8 +217,9 @@ module.exports = {
}
EMOJI_REGEX.lastIndex = 0;
let match = EMOJI_REGEX.exec(body);
let emojiBody = match && match[0] && match[0].length === body.length;
let contentBodyTrimmed = content.body.trim();
let match = EMOJI_REGEX.exec(contentBodyTrimmed);
let emojiBody = match && match[0] && match[0].length === contentBodyTrimmed.length;
let className = classNames('markdown-body', {
'emoji-body': emojiBody,

0 comments on commit a9a3d31

Please sign in to comment.