gitlab-org--gitlab-foss/lib/gitlab/other_markup.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
517 B
Ruby
Raw Normal View History

# frozen_string_literal: true
module Gitlab
# Parser/renderer for markups without other special support code.
module OtherMarkup
# Public: Converts the provided markup into HTML.
#
# input - the source text in a markup format
#
def self.render(file_name, input, context)
2017-06-21 09:48:12 -04:00
html = GitHub::Markup.render(file_name, input)
.force_encoding(input.encoding)
context[:pipeline] ||= :markup
html = Banzai.render(html, context)
html.html_safe
end
end
end