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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

38 lines
1 KiB
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[
2022-11-25 23:54:43 +05:30
Filter::TruncateVisibleFilter,
2018-11-18 11:00:15 +05:30
*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,
2022-01-26 12:08:38 +05:30
Filter::IssuableReferenceExpansionFilter,
2019-02-15 15:39:39 +05:30
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
2021-06-08 01:23:25 +05:30
Banzai::Pipeline::PostProcessPipeline.prepend_mod_with('Banzai::Pipeline::PostProcessPipeline')