Class: Banzai::Pipeline::GfmPipeline

Inherits:
BasePipeline show all
Defined in:
lib/banzai/pipeline/gfm_pipeline.rb

Direct Known Subclasses

SingleLinePipeline

Class Method Summary collapse

Methods inherited from BasePipeline

html_pipeline

Class Method Details

.filtersObject


4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/banzai/pipeline/gfm_pipeline.rb', line 4

def self.filters
  @filters ||= FilterArray[
    Filter::SyntaxHighlightFilter,
    Filter::SanitizationFilter,

    Filter::UploadLinkFilter,
    Filter::ImageLinkFilter,
    Filter::EmojiFilter,
    Filter::TableOfContentsFilter,
    Filter::AutolinkFilter,
    Filter::ExternalLinkFilter,

    Filter::UserReferenceFilter,
    Filter::IssueReferenceFilter,
    Filter::ExternalIssueReferenceFilter,
    Filter::MergeRequestReferenceFilter,
    Filter::SnippetReferenceFilter,
    Filter::CommitRangeReferenceFilter,
    Filter::CommitReferenceFilter,
    Filter::LabelReferenceFilter,
    Filter::MilestoneReferenceFilter,

    Filter::TaskListFilter
  ]
end

.transform_context(context) ⇒ Object


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

def self.transform_context(context)
  context.merge(
    only_path: true,

    # EmojiFilter
    asset_host: Gitlab::Application.config.asset_host,
    asset_root: Gitlab.config.gitlab.base_url
  )
end