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

html_pipeline_adapter.rb « syntax_highlighter « asciidoc « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b2e1c9e2379f4b127a96c699c707e125de66c928 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

module Gitlab
  module Asciidoc
    module SyntaxHighlighter
      class HtmlPipelineAdapter < Asciidoctor::SyntaxHighlighter::Base
        register_for 'gitlab-html-pipeline'

        def format(node, lang, opts)
          %(<pre #{lang ? %[lang="#{lang}"] : ''}><code>#{node.content}</code></pre>)
        end
      end
    end
  end
end