Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarin Jankovski <maxlazio@gmail.com>2013-10-11 23:41:33 +0400
committerMarin Jankovski <maxlazio@gmail.com>2013-10-11 23:41:33 +0400
commitad3defa3c2f7c3b1d5a15e0f145f424302eb23a4 (patch)
tree32853ce883e266d1a9e25752ee3ca9bc935ac48a /lib/redcarpet
parentf81532b5b929d5fa8fdf72a71eb036b0cf27735b (diff)
Skip relative links render in help page.
Diffstat (limited to 'lib/redcarpet')
-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 5ac37625d2d..b84c005524f 100644
--- a/lib/redcarpet/render/gitlab_html.rb
+++ b/lib/redcarpet/render/gitlab_html.rb
@@ -35,7 +35,11 @@ class Redcarpet::Render::GitlabHTML < Redcarpet::Render::HTML
end
def preprocess(full_document)
- h.create_relative_links(full_document, @project.path_with_namespace, @ref, @request_path, is_wiki?)
+ if @project
+ h.create_relative_links(full_document, @project.path_with_namespace, @ref, @request_path, is_wiki?)
+ else
+ full_document
+ end
end
def postprocess(full_document)