d9a4ca5975
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.
13 lines
278 B
Ruby
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
|