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

37 lines
981 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
def self.filters
2018-11-18 11:00:15 +05:30
@filters ||= FilterArray[
*internal_link_filters,
2020-04-08 14:13:33 +05:30
Filter::AbsoluteLinkFilter,
Filter::BroadcastMessagePlaceholdersFilter
2018-11-18 11:00:15 +05:30
]
end
def self.internal_link_filters
[
2019-09-30 21:07:59 +05:30
Filter::ReferenceRedactorFilter,
Filter::InlineMetricsRedactorFilter,
2020-03-13 15:44:24 +05:30
# UploadLinkFilter must come before RepositoryLinkFilter to
# prevent unnecessary Gitaly calls from being made.
Filter::UploadLinkFilter,
Filter::RepositoryLinkFilter,
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
2020-04-22 19:07:51 +05:30
Banzai::Pipeline::PostProcessPipeline.prepend_if_ee('EE::Banzai::Pipeline::PostProcessPipeline')