Commit 79c2db65 authored by Benjamin Neff's avatar Benjamin Neff

Fix Diaspora::Camo.from_markdown with frozen strings

parent f2ab09db
......@@ -5,7 +5,7 @@ module Diaspora
module Camo
def self.from_markdown(markdown_text)
return unless markdown_text
markdown_text.gsub!(/(!\[(.*?)\]\s?\([ \t]*()<?(\S+?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/m) do |link|
markdown_text = markdown_text.gsub(/(!\[(.*?)\]\s?\([ \t]*()<?(\S+?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/m) do |link|
link.gsub($4, self.image_url($4))
end
markdown_text.gsub(/src=(['"])(.+?)\1/m) do |link|
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment