module Converters def instagram(string, options = {}) options = {:height => 714, :width => 616}.merge(options) @regex = %r{https?:\/\/(www.)?instagr(am\.com|\.am)/p/.+} string.gsub(@regex) do string += '/' unless string.end_with?('/') %{} end end end