Commit a165a445 authored by Satish Perala's avatar Satish Perala Committed by Sean McGivern

Checking for the presense of markdown text

parent 9170aab9
......@@ -3,6 +3,10 @@ class MarkdownUtils
# Convert image urls in the markdown text to absolute urls
def self.absolute_image_urls(markdown_text)
if markdown_text.present?
markdown_text.gsub(/!\[(.*?)\]\((.*?)\)/, "![\\1](#{Settings.gitlab.url}\\2)")
else
markdown_text
end
end
end
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