Commit e1f141ac authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

gfm should respect @ref value when build relative links

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent e4c6dbe3
......@@ -179,7 +179,11 @@ module GitlabMarkdownHelper
if @commit
@commit.id
elsif @repository && !@repository.empty?
@repository.head_commit.sha
if @ref
@repository.commit(@ref).try(:sha)
else
@repository.head_commit.sha
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