summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMarin Jankovski <marin@gitlab.com>2014-05-23 12:58:34 +0200
committerMarin Jankovski <marin@gitlab.com>2014-05-26 20:43:58 +0200
commit281643a1bfd6f4da88a278bfce20133c80105de5 (patch)
tree2b7cd19a1ad517a1e33292044eba1c994aa7a1de /lib
parent603e04bc21b07b8b6f70e972383ea2f29d0bfce0 (diff)
downloadgitlab-ce-281643a1bfd6f4da88a278bfce20133c80105de5.tar.gz
Add feature spec.
Diffstat (limited to 'lib')
-rw-r--r--lib/redcarpet/render/gitlab_html.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/redcarpet/render/gitlab_html.rb b/lib/redcarpet/render/gitlab_html.rb
index 29bf42e7626..bb225f1acd8 100644
--- a/lib/redcarpet/render/gitlab_html.rb
+++ b/lib/redcarpet/render/gitlab_html.rb
@@ -6,8 +6,6 @@ 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")
- @request_path = @template.instance_variable_get("@path")
@options = options.dup
super options
end
@@ -46,7 +44,9 @@ class Redcarpet::Render::GitlabHTML < Redcarpet::Render::HTML
end
def postprocess(full_document)
- full_document = h.create_relative_links(full_document)
+ unless @template.instance_variable_get("@project_wiki") || @project.nil?
+ full_document = h.create_relative_links(full_document)
+ end
h.gfm(full_document)
end
end