lib/simple_format/emoji.rb
def replace_unicode_with_images(string)
      unless string && string.match(unicodes_regex)
        return string
      end

      html ||= string.dup
      html.gsub!(unicodes_regex) do |unicode|
        %Q{<img class="emoji" src="//#{ image_url_for_unicode(unicode) }" />}
      end
    end
def replace_unicode_with_images(string)
      unless string && string.match(unicodes_regex)
        return string
      end

      html ||= string.dup
      html.gsub!(unicodes_regex) do |unicode|
        %Q{<img class="emoji" src="//#{ image_url_for_unicode(unicode) }" />}
      end
    end
通过（字符）替换表情