Method: Ritex::Parser#lookup

Defined in:
lib/ritex.rb

#lookup(sym) ⇒ Object

:nodoc:



111
112
113
114
115
116
117
118
119
# File 'lib/ritex.rb', line 111

def lookup sym #:nodoc:
  case @format
  when :mathml
    return error("unknown entity #{sym.inspect}") unless MathML::ENTITIES.member? sym
    MathML::ENTITIES[sym]
  when :raw
    "\\" + sym
  end
end