Commit 29d1629f authored by Robert Speicher's avatar Robert Speicher

Merge branch 'extract-ee-specific-banzai-filters' into 'master'

Extract EE-specific lines from Banzai pipelines

See merge request gitlab-org/gitlab-ce!20636
parents d015702f 148128e9
...@@ -24,6 +24,17 @@ module Banzai ...@@ -24,6 +24,17 @@ module Banzai
Filter::AutolinkFilter, Filter::AutolinkFilter,
Filter::ExternalLinkFilter, Filter::ExternalLinkFilter,
*reference_filters,
Filter::TaskListFilter,
Filter::InlineDiffFilter,
Filter::SetDirectionFilter
]
end
def self.reference_filters
[
Filter::UserReferenceFilter, Filter::UserReferenceFilter,
Filter::IssueReferenceFilter, Filter::IssueReferenceFilter,
Filter::ExternalIssueReferenceFilter, Filter::ExternalIssueReferenceFilter,
...@@ -32,12 +43,7 @@ module Banzai ...@@ -32,12 +43,7 @@ module Banzai
Filter::CommitRangeReferenceFilter, Filter::CommitRangeReferenceFilter,
Filter::CommitReferenceFilter, Filter::CommitReferenceFilter,
Filter::LabelReferenceFilter, Filter::LabelReferenceFilter,
Filter::MilestoneReferenceFilter, Filter::MilestoneReferenceFilter
Filter::TaskListFilter,
Filter::InlineDiffFilter,
Filter::SetDirectionFilter
] ]
end end
......
...@@ -2,11 +2,17 @@ module Banzai ...@@ -2,11 +2,17 @@ module Banzai
module Pipeline module Pipeline
class PostProcessPipeline < BasePipeline class PostProcessPipeline < BasePipeline
def self.filters def self.filters
FilterArray[ @filters ||= FilterArray[
*internal_link_filters,
Filter::AbsoluteLinkFilter
]
end
def self.internal_link_filters
[
Filter::RedactorFilter, Filter::RedactorFilter,
Filter::RelativeLinkFilter, Filter::RelativeLinkFilter,
Filter::IssuableStateFilter, Filter::IssuableStateFilter
Filter::AbsoluteLinkFilter
] ]
end end
......
...@@ -10,13 +10,19 @@ module Banzai ...@@ -10,13 +10,19 @@ module Banzai
Filter::AutolinkFilter, Filter::AutolinkFilter,
Filter::ExternalLinkFilter, Filter::ExternalLinkFilter,
*reference_filters
]
end
def self.reference_filters
[
Filter::UserReferenceFilter, Filter::UserReferenceFilter,
Filter::IssueReferenceFilter, Filter::IssueReferenceFilter,
Filter::ExternalIssueReferenceFilter, Filter::ExternalIssueReferenceFilter,
Filter::MergeRequestReferenceFilter, Filter::MergeRequestReferenceFilter,
Filter::SnippetReferenceFilter, Filter::SnippetReferenceFilter,
Filter::CommitRangeReferenceFilter, Filter::CommitRangeReferenceFilter,
Filter::CommitReferenceFilter, Filter::CommitReferenceFilter
] ]
end end
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