Method: HTML::Pipeline::EmojiFilter#call
- Defined in:
- lib/html/pipeline/emoji_filter.rb
#call ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/html/pipeline/emoji_filter.rb', line 21 def call doc.search('.//text()').each do |node| content = node.to_html next unless content.include?(':') next if has_ancestor?(node, ) html = emoji_image_filter(content) next if html == content node.replace(html) end doc end |