From ad3defa3c2f7c3b1d5a15e0f145f424302eb23a4 Mon Sep 17 00:00:00 2001 From: Marin Jankovski Date: Fri, 11 Oct 2013 21:41:33 +0200 Subject: Skip relative links render in help page. --- lib/redcarpet/render/gitlab_html.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/redcarpet') 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) -- cgit v1.2.1