Class: HTML::Pipeline::AbbrEmojiFilter
- Inherits:
-
EmojiFilter
- Object
- EmojiFilter
- HTML::Pipeline::AbbrEmojiFilter
- Defined in:
- lib/html/pipeline/abbr_emoji_filter.rb
Overview
This class is very similar EmojiFilter. It removes the inline width/height attributes so that reveal-ck supplied CSS takes effect.
Instance Method Summary collapse
Instance Method Details
#emoji_image_filter(text) ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/html/pipeline/abbr_emoji_filter.rb', line 8 def emoji_image_filter(text) return text unless text.include?(':') text.gsub(emoji_pattern) do name = Regexp.last_match[1] result = "<img class='emoji' src='#{emoji_url(name)}' />" end end |