diff --git a/app/javascript/mastodon/features/emoji/emoji.js b/app/javascript/mastodon/features/emoji/emoji.js index b70fc2b373..4e75b0e16c 100644 --- a/app/javascript/mastodon/features/emoji/emoji.js +++ b/app/javascript/mastodon/features/emoji/emoji.js @@ -28,7 +28,7 @@ const emojify = (str, customEmojis = {}) => { // if you want additional emoji handler, add statements below which set replacement and return true. if (shortname in customEmojis) { const filename = allowAnimations ? customEmojis[shortname].url : customEmojis[shortname].static_url; - replacement = `${shortname}`; + replacement = `${shortname}`; return true; } return false; diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss index 700dd9740f..1ff98b31c0 100644 --- a/app/javascript/styles/mastodon/components.scss +++ b/app/javascript/styles/mastodon/components.scss @@ -521,6 +521,11 @@ } .emojione { + width: 18px; + height: 18px; + } + + .custom-emoji { width: 20px; height: 20px; margin: -5px 0 0; @@ -784,6 +789,11 @@ line-height: 24px; .emojione { + width: 22px; + height: 22px; + } + + .custom-emoji { width: 24px; height: 24px; margin: -5px 0 0; diff --git a/app/lib/formatter.rb b/app/lib/formatter.rb index 57f105da74..c3801ea881 100644 --- a/app/lib/formatter.rb +++ b/app/lib/formatter.rb @@ -107,7 +107,7 @@ class Formatter emoji = emoji_map[shortcode] if emoji - replacement = "\":#{shortcode}:\"" + replacement = "\":#{shortcode}:\"" before_html = shortname_start_index.positive? ? html[0..shortname_start_index - 1] : '' html = before_html + replacement + html[i + 1..-1] i += replacement.size - (shortcode.size + 2) - 1