lib/middleman-syntax/extension.rb in middleman-syntax-2.1.0 vs lib/middleman-syntax/extension.rb in middleman-syntax-3.0.0
- old
+ new
@@ -1,9 +1,10 @@
require 'rouge'
require 'middleman-syntax/highlighter'
require 'middleman-syntax/redcarpet_code_renderer'
require 'middleman-syntax/haml_monkey_patch'
+require 'middleman-syntax/language_parameter_parser.rb'
module Middleman
module Syntax
class SyntaxExtension < Extension
option :css_class, 'highlight', 'Class name applied to the syntax-highlighted output.'
@@ -13,10 +14,9 @@
option :wrap, true, 'Wrap the highlighted content in a container (<pre> or <div>, depending on whether :line_numbers is on).'
option :lexer_options, {}, 'Options for the Rouge lexers.'
def after_configuration
Middleman::Syntax::Highlighter.options = options
-
if app.config[:markdown_engine] == :redcarpet
require 'middleman-core/renderers/redcarpet'
Middleman::Renderers::MiddlemanRedcarpetHTML.send :include, RedcarpetCodeRenderer
elsif app.config[:markdown_engine] == :kramdown
require 'kramdown'