2015-12-15 09:51:16 -05:00
|
|
|
module Banzai
|
|
|
|
module Pipeline
|
|
|
|
class GfmPipeline < BasePipeline
|
|
|
|
def self.filters
|
2016-03-01 15:54:35 -05:00
|
|
|
@filters ||= FilterArray[
|
2015-12-15 09:51:16 -05:00
|
|
|
Filter::SyntaxHighlightFilter,
|
|
|
|
Filter::SanitizationFilter,
|
|
|
|
|
|
|
|
Filter::UploadLinkFilter,
|
2016-03-30 18:03:49 -04:00
|
|
|
Filter::ImageLinkFilter,
|
2015-12-15 09:51:16 -05:00
|
|
|
Filter::EmojiFilter,
|
|
|
|
Filter::TableOfContentsFilter,
|
|
|
|
Filter::AutolinkFilter,
|
|
|
|
Filter::ExternalLinkFilter,
|
|
|
|
|
|
|
|
Filter::UserReferenceFilter,
|
|
|
|
Filter::IssueReferenceFilter,
|
|
|
|
Filter::ExternalIssueReferenceFilter,
|
|
|
|
Filter::MergeRequestReferenceFilter,
|
|
|
|
Filter::SnippetReferenceFilter,
|
|
|
|
Filter::CommitRangeReferenceFilter,
|
|
|
|
Filter::CommitReferenceFilter,
|
|
|
|
Filter::LabelReferenceFilter,
|
2015-12-24 08:43:07 -05:00
|
|
|
Filter::MilestoneReferenceFilter,
|
2015-12-15 09:51:16 -05:00
|
|
|
|
|
|
|
Filter::TaskListFilter
|
|
|
|
]
|
|
|
|
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
|