lib/kramdown/converter.rb in kramdown-1.17.0 vs lib/kramdown/converter.rb in kramdown-2.0.0.beta1
- old
+ new
@@ -1,9 +1,9 @@
-# -*- coding: utf-8 -*-
+# -*- coding: utf-8; frozen_string_literal: true -*-
#
#--
-# Copyright (C) 2009-2016 Thomas Leitner <t_leitner@gmx.at>
+# Copyright (C) 2009-2019 Thomas Leitner <t_leitner@gmx.at>
#
# This file is part of kramdown which is licensed under the MIT.
#++
#
@@ -23,43 +23,42 @@
autoload :Html, 'kramdown/converter/html'
autoload :Latex, 'kramdown/converter/latex'
autoload :Kramdown, 'kramdown/converter/kramdown'
autoload :Toc, 'kramdown/converter/toc'
autoload :RemoveHtmlTags, 'kramdown/converter/remove_html_tags'
- autoload :Pdf, 'kramdown/converter/pdf'
autoload :HashAST, 'kramdown/converter/hash_ast'
autoload :HashAst, 'kramdown/converter/hash_ast'
autoload :Man, 'kramdown/converter/man'
extend ::Kramdown::Utils::Configurable
configurable(:syntax_highlighter)
- ['Minted', "Coderay", "Rouge"].each do |klass_name|
+ ['Minted', "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.const_defined?(:AVAILABLE) || klass::AVAILABLE
add_syntax_highlighter(kn_down, klass)
else
- add_syntax_highlighter(kn_down) {|*args| nil}
+ add_syntax_highlighter(kn_down) { nil }
end
syntax_highlighter(kn_down).call(converter, text, lang, type, opts)
end
end
configurable(:math_engine)
- ["Mathjax", "MathjaxNode", "Katex", "SsKaTeX", "Ritex", "Itex2MML"].each do |klass_name|
+ ["Mathjax"].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.const_defined?(:AVAILABLE) || klass::AVAILABLE
add_math_engine(kn_down, klass)
else
- add_math_engine(kn_down) {|*args| nil}
+ add_math_engine(kn_down) { nil }
end
math_engine(kn_down).call(converter, el, opts)
end
end