summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMarin Jankovski <maxlazio@gmail.com>2013-10-08 14:21:01 +0200
committerMarin Jankovski <maxlazio@gmail.com>2013-10-08 14:21:01 +0200
commit06d6f443677b068eb942eb94dad1dc1ca22c0eed (patch)
treef306384c1d7f19a62176faa5ed9feeb7893e74f6 /lib
parent817399e3be6bda06ed7b4c61eb8192a532ed735e (diff)
downloadgitlab-ce-06d6f443677b068eb942eb94dad1dc1ca22c0eed.tar.gz
Check for wiki.
Diffstat (limited to 'lib')
-rw-r--r--lib/redcarpet/render/gitlab_html.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/redcarpet/render/gitlab_html.rb b/lib/redcarpet/render/gitlab_html.rb
index 2277caef953..b03c4dbfe1b 100644
--- a/lib/redcarpet/render/gitlab_html.rb
+++ b/lib/redcarpet/render/gitlab_html.rb
@@ -34,10 +34,14 @@ class Redcarpet::Render::GitlabHTML < Redcarpet::Render::HTML
end
def preprocess(full_document)
- h.create_relative_links(full_document, @project.path_with_namespace, @ref)
+ h.create_relative_links(full_document, @project.path_with_namespace, @ref, is_wiki?)
end
def postprocess(full_document)
h.gfm(full_document)
end
+
+ def is_wiki?
+ @template.instance_variable_get("@wiki")
+ end
end