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

44 lines
1.2 KiB
Ruby
Raw Normal View History

2015-12-23 02:04:40 +05:30
module Banzai
module Pipeline
class GfmPipeline < BasePipeline
def self.filters
2016-06-02 11:05:42 +05:30
@filters ||= FilterArray[
2015-12-23 02:04:40 +05:30
Filter::SyntaxHighlightFilter,
Filter::SanitizationFilter,
Filter::UploadLinkFilter,
2016-08-24 12:49:21 +05:30
Filter::VideoLinkFilter,
2016-06-02 11:05:42 +05:30
Filter::ImageLinkFilter,
2015-12-23 02:04:40 +05:30
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,
2015-12-23 02:04:40 +05:30
2016-06-02 11:05:42 +05:30
Filter::TaskListFilter,
Filter::InlineDiffFilter
2015-12-23 02:04:40 +05:30
]
end
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
end
end
end