Module: Gitlab::OtherMarkup

Defined in:
lib/gitlab/other_markup.rb

Overview

Parser/renderer for markups without other special support code.

Class Method Summary collapse

Class Method Details

.render(file_name, input, context) ⇒ Object

Public: Converts the provided markup into HTML.

input - the source text in a markup format


10
11
12
13
14
15
16
17
18
# File 'lib/gitlab/other_markup.rb', line 10

def self.render(file_name, input, context)
  html = GitHub::Markup.render(file_name, input)
    .force_encoding(input.encoding)
  context[:pipeline] ||= :markup

  html = Banzai.render(html, context)

  html.html_safe
end