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 <marin@gitlab.com>2014-05-20 17:29:14 +0400
committerMarin Jankovski <marin@gitlab.com>2014-05-26 22:43:58 +0400
commit52c3179be94e857ecb0de2cfa8ecbd484a36d213 (patch)
treeb0bd53ab4d24b16159301b45f1683993df9c3506 /lib/redcarpet
parentf48658813ca86464aa76de4ff906c1ef47ddd863 (diff)
Do not replace links inside code blocks, less code for the same amount of work.
Diffstat (limited to 'lib/redcarpet')
-rw-r--r--lib/redcarpet/render/gitlab_html.rb17
1 files changed, 1 insertions, 16 deletions
diff --git a/lib/redcarpet/render/gitlab_html.rb b/lib/redcarpet/render/gitlab_html.rb
index 7d9428ff27d..29bf42e7626 100644
--- a/lib/redcarpet/render/gitlab_html.rb
+++ b/lib/redcarpet/render/gitlab_html.rb
@@ -45,23 +45,8 @@ class Redcarpet::Render::GitlabHTML < Redcarpet::Render::HTML
end
end
- def preprocess(full_document)
- if is_wiki?
- full_document
- elsif @project
- h.create_relative_links(full_document, @project, @ref, @request_path)
- else
- full_document
- end
- end
-
def postprocess(full_document)
+ full_document = h.create_relative_links(full_document)
h.gfm(full_document)
end
-
- def is_wiki?
- if @template.instance_variable_get("@project_wiki")
- @template.instance_variable_get("@page")
- end
- end
end