summaryrefslogtreecommitdiff
path: root/app/helpers/gitlab_markdown_helper.rb
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2016-06-21 17:07:17 +0200
committerYorick Peterse <yorickpeterse@gmail.com>2016-06-21 17:39:01 +0200
commitd9a4ca5975b4fb91b147930d863f0bb4b9619a64 (patch)
treecadcad43926a1dfe08c71bb644a136127ae50796 /app/helpers/gitlab_markdown_helper.rb
parent0468deafbd6fcf008eb672dd42b98390d95e8add (diff)
downloadgitlab-ce-d9a4ca5975b4fb91b147930d863f0bb4b9619a64.tar.gz
Move pre_process into render_resultremove-banzai-pre-process
The method Banzai::Renderer.pre_process would always be called, regardless of whether the Markdown to render was already cached or not. In cache the document _was_ cached the output of the pre-processing pipeline was ignored resulting in it doing nothing but wasting CPU cycles. This commit moves Banzai::Renderer.pre_process into Banzai::Renderer.render_result so that it's _only_ used when needed.
Diffstat (limited to 'app/helpers/gitlab_markdown_helper.rb')
-rw-r--r--app/helpers/gitlab_markdown_helper.rb2
1 files changed, 0 insertions, 2 deletions
diff --git a/app/helpers/gitlab_markdown_helper.rb b/app/helpers/gitlab_markdown_helper.rb
index a0dafc52622..1a259656f31 100644
--- a/app/helpers/gitlab_markdown_helper.rb
+++ b/app/helpers/gitlab_markdown_helper.rb
@@ -50,8 +50,6 @@ module GitlabMarkdownHelper
context[:project] ||= @project
- text = Banzai.pre_process(text, context)
-
html = Banzai.render(text, context)
context.merge!(