Class: Banzai::Pipeline::SingleLinePipeline

Inherits:
GfmPipeline show all
Defined in:
lib/banzai/pipeline/single_line_pipeline.rb

Direct Known Subclasses

CommitDescriptionPipeline

Class Method Summary collapse

Methods inherited from GfmPipeline

metrics_filters

Methods inherited from BasePipeline

html_pipeline

Class Method Details

.filtersObject


6
7
8
9
10
11
12
13
14
15
16
# File 'lib/banzai/pipeline/single_line_pipeline.rb', line 6

def self.filters
  @filters ||= FilterArray[
    Filter::HtmlEntityFilter,
    Filter::SanitizationFilter,
    Filter::AssetProxyFilter,
    Filter::EmojiFilter,
    Filter::AutolinkFilter,
    Filter::ExternalLinkFilter,
    *reference_filters
  ]
end

.reference_filtersObject


18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/banzai/pipeline/single_line_pipeline.rb', line 18

def self.reference_filters
  [
    Filter::References::UserReferenceFilter,
    Filter::References::IssueReferenceFilter,
    Filter::References::ExternalIssueReferenceFilter,
    Filter::References::MergeRequestReferenceFilter,
    Filter::References::SnippetReferenceFilter,
    Filter::References::CommitRangeReferenceFilter,
    Filter::References::CommitReferenceFilter,
    Filter::References::AlertReferenceFilter,
    Filter::References::FeatureFlagReferenceFilter
  ]
end

.transform_context(context) ⇒ Object


32
33
34
35
36
37
38
# File 'lib/banzai/pipeline/single_line_pipeline.rb', line 32

def self.transform_context(context)
  context = Filter::AssetProxyFilter.transform_context(context)

  super(context).merge(
    no_sourcepos: true
  )
end