Sha256: 188fa579f327966b17c8b02815b697cabae5cfc5ceb54aee99d4ead43731cb90

Contents?: true

Size: 439 Bytes

Versions: 5

Compression:

Stored size: 439 Bytes

Contents

require 'middleman-syntax/language_parameter_parser.rb'

module Middleman
  module Syntax
    # A mixin for the Redcarpet Markdown renderer that will highlight
    # code.
    module RedcarpetCodeRenderer
      def block_code(code, language)
        opts = Middleman::Syntax::LanguageParameterParser.parse_parameter_from_language(language)
        Middleman::Syntax::Highlighter.highlight(code, language, opts)
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
middleman-syntax-3.4.0 lib/middleman-syntax/redcarpet_code_renderer.rb
middleman-syntax-3.3.0 lib/middleman-syntax/redcarpet_code_renderer.rb
files.com-1.0.55 docs/vendor/bundle/ruby/2.5.0/gems/middleman-syntax-3.0.0/lib/middleman-syntax/redcarpet_code_renderer.rb
middleman-syntax-3.2.0 lib/middleman-syntax/redcarpet_code_renderer.rb
middleman-syntax-3.0.0 lib/middleman-syntax/redcarpet_code_renderer.rb