Method: MaRuKu::Out::HTML#to_html_inline_math

Defined in:
lib/maruku/ext/math/to_html.rb

#to_html_inline_mathObject



99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# File 'lib/maruku/ext/math/to_html.rb', line 99

def to_html_inline_math
  mathml = get_setting(:html_math_output_mathml) && render_mathml(:inline, self.math)
  if mathml
    mathml.add_class('maruku-mathml')
    return mathml.to_html
  end

  png = get_setting(:html_math_output_png) && render_png(:inline, self.math)

  HTMLElement.new 'span', 'class' => 'maruku-inline' do
    # TODO: It seems weird that we output an empty span if there's no PNG
    if png
      adjust_png(png, true)
    end
  end
end