module Kramdown::Converter::MathEngine::Ritex
Uses the Ritex
library for converting math formulas to MathML.
Constants
- VERSION
Public Class Methods
call(converter, el, opts)
click to toggle source
# File lib/kramdown/converter/math_engine/ritex.rb, line 20 def self.call(converter, el, opts) type = el.options[: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