diff options
author | Marin Jankovski <marin@gitlab.com> | 2014-05-20 17:29:14 +0400 |
---|---|---|
committer | Marin Jankovski <marin@gitlab.com> | 2014-05-26 22:43:58 +0400 |
commit | 52c3179be94e857ecb0de2cfa8ecbd484a36d213 (patch) | |
tree | b0bd53ab4d24b16159301b45f1683993df9c3506 /lib/redcarpet | |
parent | f48658813ca86464aa76de4ff906c1ef47ddd863 (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.rb | 17 |
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 |