2016-04-02 18:10:28 +05:30
|
|
|
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)
|
|
|
|
html = GitHub::Markup.render(file_name, input).
|
|
|
|
force_encoding(input.encoding)
|
2017-08-17 22:00:37 +05:30
|
|
|
context[:pipeline] = :markup
|
2016-04-02 18:10:28 +05:30
|
|
|
|
2017-08-17 22:00:37 +05:30
|
|
|
html = Banzai.render(html, context)
|
2016-04-02 18:10:28 +05:30
|
|
|
|
|
|
|
html.html_safe
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|