lib/kramdown/converter.rb in kramdown-1.6.0 vs lib/kramdown/converter.rb in kramdown-1.7.0

- old
+ new

@@ -29,34 +29,31 @@ extend ::Kramdown::Utils::Configurable configurable(:syntax_highlighter) - ["Coderay", "Rouge"].each do |klass_name| + ['Minted', "Coderay", "Rouge"].each do |klass_name| kn_down = klass_name.downcase.intern add_syntax_highlighter(kn_down) do |converter, text, lang, type, opts| require "kramdown/converter/syntax_highlighter/#{kn_down}" klass = ::Kramdown::Utils.deep_const_get("::Kramdown::Converter::SyntaxHighlighter::#{klass_name}") - if klass::AVAILABLE + if !klass.const_defined?(:AVAILABLE) || klass::AVAILABLE add_syntax_highlighter(kn_down, klass) else add_syntax_highlighter(kn_down) {|*args| nil} end syntax_highlighter(kn_down).call(converter, text, lang, type, opts) end end configurable(:math_engine) - require 'kramdown/converter/math_engine/mathjax' - add_math_engine(:mathjax, ::Kramdown::Converter::MathEngine::Mathjax) - - ["Ritex", "Itex2MML"].each do |klass_name| + ['Mathjax', "MathjaxNode", "Ritex", "Itex2MML"].each do |klass_name| kn_down = klass_name.downcase.intern add_math_engine(kn_down) do |converter, el, opts| require "kramdown/converter/math_engine/#{kn_down}" klass = ::Kramdown::Utils.deep_const_get("::Kramdown::Converter::MathEngine::#{klass_name}") - if klass::AVAILABLE + if !klass.const_defined?(:AVAILABLE) || klass::AVAILABLE add_math_engine(kn_down, klass) else add_math_engine(kn_down) {|*args| nil} end math_engine(kn_down).call(converter, el, opts)