# frozen_string_literal: true module Onebox module Engine class RedditImageOnebox include Engine include StandardEmbed matches_regexp(/^https?:\/\/(www\.)?reddit\.com/) def to_html if raw[:type] == "image" <<-HTML HTML else html = Onebox::Engine::WhitelistedGenericOnebox.new(@url, @cache, @timeout).to_html return if Onebox::Helpers.blank?(html) html end end end end end