Class: HTML::Pipeline::RevealCKEmojiFilter
- Inherits:
-
EmojiFilter
- Object
- EmojiFilter
- HTML::Pipeline::RevealCKEmojiFilter
- Defined in:
- lib/reveal-ck/builders/create_slides_html.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
60 61 62 63 64 65 66 67 68 |
# File 'lib/reveal-ck/builders/create_slides_html.rb', line 60 def emoji_image_filter(text) return text unless text.include?(':') text.gsub(emoji_pattern) do name = Regexp.last_match[1] result = "<img class='emoji' title=':#{name}:' alt=':#{name}:'" result + "src='#{emoji_url(name)}' align='absmiddle' />" end end |