2015-12-23 02:04:40 +05:30
|
|
|
require 'banzai'
|
|
|
|
|
|
|
|
module Banzai
|
|
|
|
module Pipeline
|
|
|
|
class GfmPipeline < BasePipeline
|
|
|
|
def self.filters
|
|
|
|
@filters ||= [
|
|
|
|
Filter::SyntaxHighlightFilter,
|
|
|
|
Filter::SanitizationFilter,
|
|
|
|
|
|
|
|
Filter::UploadLinkFilter,
|
|
|
|
Filter::EmojiFilter,
|
|
|
|
Filter::TableOfContentsFilter,
|
|
|
|
Filter::AutolinkFilter,
|
|
|
|
Filter::ExternalLinkFilter,
|
|
|
|
|
|
|
|
Filter::UserReferenceFilter,
|
|
|
|
Filter::IssueReferenceFilter,
|
|
|
|
Filter::ExternalIssueReferenceFilter,
|
|
|
|
Filter::MergeRequestReferenceFilter,
|
|
|
|
Filter::SnippetReferenceFilter,
|
|
|
|
Filter::CommitRangeReferenceFilter,
|
|
|
|
Filter::CommitReferenceFilter,
|
|
|
|
Filter::LabelReferenceFilter,
|
2016-01-14 18:37:52 +05:30
|
|
|
Filter::MilestoneReferenceFilter,
|
2015-12-23 02:04:40 +05:30
|
|
|
|
|
|
|
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
|