debian-mirror-gitlab/lib/gitlab/asciidoc/syntax_highlighter/html_pipeline_adapter.rb
2022-03-02 08:16:31 +05:30

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