summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMarin Jankovski <maxlazio@gmail.com>2013-10-08 13:02:30 +0200
committerMarin Jankovski <maxlazio@gmail.com>2013-10-08 13:07:59 +0200
commit817399e3be6bda06ed7b4c61eb8192a532ed735e (patch)
treeeaf24c40d244bd4e19cda804acd894da25b2bfb1 /lib
parent810d90dd26d98a80ffb3a4100b1c4f70b824bb70 (diff)
downloadgitlab-ce-817399e3be6bda06ed7b4c61eb8192a532ed735e.tar.gz
Show links with correct ref.
Diffstat (limited to 'lib')
-rw-r--r--lib/redcarpet/render/gitlab_html.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/redcarpet/render/gitlab_html.rb b/lib/redcarpet/render/gitlab_html.rb
index c0e858bab7d..2277caef953 100644
--- a/lib/redcarpet/render/gitlab_html.rb
+++ b/lib/redcarpet/render/gitlab_html.rb
@@ -6,6 +6,7 @@ class Redcarpet::Render::GitlabHTML < Redcarpet::Render::HTML
def initialize(template, options = {})
@template = template
@project = @template.instance_variable_get("@project")
+ @ref = @template.instance_variable_get("@ref")
super options
end
@@ -33,7 +34,7 @@ class Redcarpet::Render::GitlabHTML < Redcarpet::Render::HTML
end
def preprocess(full_document)
- h.create_relative_links(full_document, @project.path_with_namespace)
+ h.create_relative_links(full_document, @project.path_with_namespace, @ref)
end
def postprocess(full_document)