gitlab-org--gitlab-foss/lib/banzai.rb
Yorick Peterse d9a4ca5975
Move pre_process into render_result
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.
2016-06-21 17:39:01 +02:00

13 lines
278 B
Ruby

module Banzai
def self.render(text, context = {})
Renderer.render(text, context)
end
def self.render_result(text, context = {})
Renderer.render_result(text, context)
end
def self.post_process(html, context)
Renderer.post_process(html, context)
end
end