2018-10-06 19:10:08 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2015-12-15 09:51:16 -05:00
|
|
|
module Banzai
|
|
|
|
module Pipeline
|
|
|
|
class SingleLinePipeline < GfmPipeline
|
2015-12-30 16:44:22 -05:00
|
|
|
def self.filters
|
2016-03-01 15:54:35 -05:00
|
|
|
@filters ||= FilterArray[
|
2016-10-10 10:46:26 -04:00
|
|
|
Filter::HtmlEntityFilter,
|
2015-12-30 16:44:22 -05:00
|
|
|
Filter::SanitizationFilter,
|
2015-12-15 09:51:16 -05:00
|
|
|
|
2015-12-30 16:44:22 -05:00
|
|
|
Filter::EmojiFilter,
|
|
|
|
Filter::AutolinkFilter,
|
|
|
|
Filter::ExternalLinkFilter,
|
|
|
|
|
2018-07-13 06:32:49 -04:00
|
|
|
*reference_filters
|
|
|
|
]
|
|
|
|
end
|
|
|
|
|
|
|
|
def self.reference_filters
|
|
|
|
[
|
2015-12-30 16:44:22 -05:00
|
|
|
Filter::UserReferenceFilter,
|
|
|
|
Filter::IssueReferenceFilter,
|
|
|
|
Filter::ExternalIssueReferenceFilter,
|
|
|
|
Filter::MergeRequestReferenceFilter,
|
|
|
|
Filter::SnippetReferenceFilter,
|
|
|
|
Filter::CommitRangeReferenceFilter,
|
2018-07-13 06:32:49 -04:00
|
|
|
Filter::CommitReferenceFilter
|
2015-12-30 16:44:22 -05:00
|
|
|
]
|
|
|
|
end
|
2019-01-11 19:31:00 -05:00
|
|
|
|
|
|
|
def self.transform_context(context)
|
|
|
|
super(context).merge(
|
|
|
|
no_sourcepos: true
|
|
|
|
)
|
|
|
|
end
|
2015-12-15 09:51:16 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|