#144 fix native emoji tag for common mark
This commit is contained in:
parent
db8f09d79a
commit
b23f8437aa
@ -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'
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user