Don't include a double slash when rewriting the URL
This commit is contained in:
parent
827712e78e
commit
25664f89ac
|
@ -22,7 +22,10 @@ module Gitlab
|
|||
|
||||
markdown_text.gsub(MARKDOWN_SIMPLE_IMAGE) do
|
||||
if $~[:image]
|
||||
"![#{$~[:title]}](#{Gitlab.config.gitlab.url}/#{$~[:url]})"
|
||||
url = $~[:url]
|
||||
url = "/#{url}" unless url.start_with?('/')
|
||||
|
||||
"![#{$~[:title]}](#{Gitlab.config.gitlab.url}#{url})"
|
||||
else
|
||||
$~[0]
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue