Merge branch 'remove-banzai-pre-process' into 'master'
Move pre_process into render_result This MR moves `Banzai::Renderer.pre_process` into `Banzai::Renderer.render_result`. The `pre_process` method was called even when its output would be ignored. See 11a5a4f359ee57029dbfcc9185fc6b47243ea2aa for more details. See merge request !4830
This commit is contained in:
commit
ae63172dd2
|
@ -16,6 +16,7 @@ v 8.9.0 (unreleased)
|
|||
- Fix issue with arrow keys not working in search autocomplete dropdown
|
||||
- Fix an issue where note polling stopped working if a window was in the
|
||||
background during a refresh.
|
||||
- Pre-processing Markdown now only happens when needed
|
||||
- Make EmailsOnPushWorker use Sidekiq mailers queue
|
||||
- Redesign all Devise emails. !4297
|
||||
- Don't show 'Leave Project' to group members
|
||||
|
|
|
@ -50,8 +50,6 @@ module GitlabMarkdownHelper
|
|||
|
||||
context[:project] ||= @project
|
||||
|
||||
text = Banzai.pre_process(text, context)
|
||||
|
||||
html = Banzai.render(text, context)
|
||||
|
||||
context.merge!(
|
||||
|
|
|
@ -7,10 +7,6 @@ module Banzai
|
|||
Renderer.render_result(text, context)
|
||||
end
|
||||
|
||||
def self.pre_process(text, context)
|
||||
Renderer.pre_process(text, context)
|
||||
end
|
||||
|
||||
def self.post_process(html, context)
|
||||
Renderer.post_process(html, context)
|
||||
end
|
||||
|
|
|
@ -30,15 +30,11 @@ module Banzai
|
|||
end
|
||||
|
||||
def self.render_result(text, context = {})
|
||||
text = Pipeline[:pre_process].to_html(text, context) if text
|
||||
|
||||
Pipeline[context[:pipeline]].call(text, context)
|
||||
end
|
||||
|
||||
def self.pre_process(text, context)
|
||||
pipeline = Pipeline[:pre_process]
|
||||
|
||||
pipeline.to_html(text, context)
|
||||
end
|
||||
|
||||
# Perform post-processing on an HTML String
|
||||
#
|
||||
# This method is used to perform state-dependent changes to a String of
|
||||
|
|
Loading…
Reference in New Issue