Module: Kramdown::Converter::MathEngine::Ritex
- Defined in:
- lib/kramdown/converter/math_engine/ritex.rb
Overview
Uses the Ritex library for converting math formulas to MathML.
Class Method Summary collapse
Class Method Details
.call(converter, el, opts) ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/kramdown/converter/math_engine/ritex.rb', line 24 def self.call(converter, el, opts) type = el.[:category] result = ::Ritex::Parser.new.parse(el.value, :display => (type == :block)) attr = el.attr.dup attr.delete('xmlns') attr.delete('display') result.insert("<math".length, converter.html_attributes(attr)) (type == :block ? "#{' '*opts[:indent]}#{result}\n" : result) end |