class Markdowner # opts[:allow_images] allows tags # opts[:disable_profile_links] disables @username -> /u/username links def self.to_html(text, opts = {}) if text.blank? return "" end args = [ :smart, :autolink, :safelink, :filter_styles, :filter_html, :strict ] if !opts[:allow_images] args.push :no_image end html = RDiscount.new(text.to_s, *args).to_html # change