BigW Consortium Gitlab

other_markup.rb 484 Bytes
Newer Older
1 2 3 4 5 6 7
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
    #
8
    def self.render(file_name, input, context)
9 10
      html = GitHub::Markup.render(file_name, input)
        .force_encoding(input.encoding)
11
      context[:pipeline] = :markup
12

13
      html = Banzai.render(html, context)
14

15 16 17 18
      html.html_safe
    end
  end
end