Commit 5a47cfd7 authored by Brett Walker's avatar Brett Walker

Make logic of filter loop more understandable

parent 6c7a2a6d
...@@ -91,10 +91,13 @@ RSpec.describe 'GitLab Markdown Benchmark', :aggregate_failures do ...@@ -91,10 +91,13 @@ RSpec.describe 'GitLab Markdown Benchmark', :aggregate_failures do
result = nil result = nil
pipeline.filters.each do |filter_klass| pipeline.filters.each do |filter_klass|
# store inputs for current filter_klass
filter_source[filter_klass] = { input_text: input_text, input_result: result }
filter = filter_klass.new(input_text, context, result) filter = filter_klass.new(input_text, context, result)
output = filter.call output = filter.call
filter_source[filter_klass] = { input_text: input_text, input_result: result } # save these for the next filter_klass
input_text = output input_text = output
result = filter.result result = filter.result
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment