#144 fix native emoji tag for common mark

This commit is contained in:
Alexander Meindl 2022-07-27 11:20:55 +02:00
parent db8f09d79a
commit b23f8437aa
2 changed files with 6 additions and 6 deletions

View File

@ -49,15 +49,15 @@ module Additionals
end
end
def emoji_tag(emoji, emoji_code)
def emoji_tag(emoji, _emoji_code)
if Additionals.setting? :disable_emoji_native_support
emoji_tag_fallback emoji, emoji_code
emoji_tag_fallback emoji
else
emoji_tag_native emoji, emoji_code
emoji_tag_native emoji
end
end
def emoji_tag_native(emoji, _emoji_code)
def emoji_tag_native(emoji)
return unless emoji
data = {
@ -69,7 +69,7 @@ module Additionals
ActionController::Base.helpers.content_tag 'additionals-emoji', emoji.codepoints, options
end
def emoji_tag_fallback(emoji, _emoji_code)
def emoji_tag_fallback(emoji)
ActionController::Base.helpers.image_tag emoji_image_path(emoji),
title: emoji.description,
class: 'inline_emojify'

View File

@ -45,7 +45,7 @@ module Additionals
def emoji_unicode_element_unicode_filter(text)
text.gsub emoji_unicode_pattern do |moji|
emoji = TanukiEmoji.find_by_codepoints moji # rubocop: disable Rails/DynamicFindBy
emoji_tag_native emoji, name
emoji_tag_native emoji
end
end