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

39 lines
897 B
Ruby
Raw Normal View History

2018-12-13 13:39:08 +05:30
# frozen_string_literal: true
2015-12-23 02:04:40 +05:30
module Banzai
module Pipeline
class SingleLinePipeline < GfmPipeline
def self.filters
2016-06-02 11:05:42 +05:30
@filters ||= FilterArray[
2016-11-03 12:29:30 +05:30
Filter::HtmlEntityFilter,
Filter::SanitizationFilter,
2015-12-23 02:04:40 +05:30
Filter::EmojiFilter,
Filter::AutolinkFilter,
Filter::ExternalLinkFilter,
2018-11-18 11:00:15 +05:30
*reference_filters
]
end
def self.reference_filters
[
Filter::UserReferenceFilter,
Filter::IssueReferenceFilter,
Filter::ExternalIssueReferenceFilter,
Filter::MergeRequestReferenceFilter,
Filter::SnippetReferenceFilter,
Filter::CommitRangeReferenceFilter,
2018-11-18 11:00:15 +05:30
Filter::CommitReferenceFilter
]
end
2019-03-02 22:35:43 +05:30
def self.transform_context(context)
super(context).merge(
no_sourcepos: true
)
end
2015-12-23 02:04:40 +05:30
end
end
end