Welcome to mirror list, hosted at ThFree Co, Russian Federation.

html.rb « renderer « banzai « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 252caa35947380b2456c9887803b3f79fa8efda2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
module Banzai
  module Renderer
    class HTML < Redcarpet::Render::HTML
      def block_code(code, lang)
        lang_attr = lang ? %Q{ lang="#{lang}"} : ''

        "\n<pre>" \
          "<code#{lang_attr}>#{html_escape(code)}</code>" \
        "</pre>"
      end
    end
  end
end