Class: LaTeX::Decode::Maths

Inherits:
Decoder
  • Object
show all
Defined in:
lib/latex/decode/maths.rb

Class Method Summary collapse

Methods inherited from Decoder

decode, inherited, subclasses

Class Method Details

.decode!(string) ⇒ Object



9
10
11
12
13
14
15
16
# File 'lib/latex/decode/maths.rb', line 9

def self.decode! (string)
  patterns.each do |pattern|
    string.gsub!(pattern) do
      LaTeX.to_math_ml($1)
    end
  end
  string
end