gitlab-org--gitlab-foss/lib/gitlab/asciidoc/syntax_highlighter/html_pipeline_adapter.rb
2019-07-02 09:24:05 +02:00

15 lines
372 B
Ruby

# 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><code #{lang ? %[ lang="#{lang}"] : ''}>#{node.content}</code></pre>)
end
end
end
end
end