debian-mirror-gitlab/lib/banzai/pipeline/post_process_pipeline.rb

33 lines
778 B
Ruby
Raw Normal View History

2018-12-13 13:39:08 +05:30
# frozen_string_literal: true
2015-12-23 02:04:40 +05:30
module Banzai
module Pipeline
class PostProcessPipeline < BasePipeline
2019-12-04 20:38:33 +05:30
prepend_if_ee('EE::Banzai::Pipeline::PostProcessPipeline') # rubocop: disable Cop/InjectEnterpriseEditionModule
2015-12-23 02:04:40 +05:30
def self.filters
2018-11-18 11:00:15 +05:30
@filters ||= FilterArray[
*internal_link_filters,
Filter::AbsoluteLinkFilter
]
end
def self.internal_link_filters
[
2019-09-30 21:07:59 +05:30
Filter::ReferenceRedactorFilter,
Filter::InlineMetricsRedactorFilter,
2015-12-23 02:04:40 +05:30
Filter::RelativeLinkFilter,
2019-02-15 15:39:39 +05:30
Filter::IssuableStateFilter,
Filter::SuggestionFilter
2015-12-23 02:04:40 +05:30
]
end
def self.transform_context(context)
context.merge(
post_process: true
)
end
end
end
end