Method: HTML::Pipeline::EmojiFilter#call
- Defined in:
- lib/html/pipeline/emoji_filter.rb
#call ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/html/pipeline/emoji_filter.rb', line 17 def call search_text_nodes(doc).each do |node| content = node.to_html next unless content.include?(':') next if has_ancestor?(node, %w(pre code)) html = emoji_image_filter(content) next if html == content node.replace(html) end doc end |