Method: Deplate::Formatter::HTML#format_math

Defined in:
lib/deplate/mod/html-jsmath.rb,
lib/deplate/mod/html-mathml.rb,
lib/deplate/mod/html-asciimath.rb

#format_math(invoker) ⇒ Object



31
32
33
34
35
36
37
38
# File 'lib/deplate/mod/html-jsmath.rb', line 31

def format_math(invoker)
    block, formula = bare_latex_formula(invoker.text)
    if formula
        %{<span class="math">#{formula}</span>}
    else
        invoker.log(['Internal error', invoker.text], :error)
    end
end