### Home Classes Methods

### In Files

- lib/math_ml/util.rb

### Namespace

- CLASS MathML::Util::MathData
- CLASS MathML::Util::SimpleLaTeX

### Methods

- ::collect_regexp
- ::escapeXML
- #collect_regexp
- #escapeXML

### Class/Module Index

Quicksearch

- MathML
- MathML::Align
- MathML::Element
- MathML::Error
- MathML::Fenced
- MathML::Frac
- MathML::Identifier
- MathML::LaTeX
- MathML::LaTeX::BlockNotClosed
- MathML::LaTeX::Builtin
- MathML::LaTeX::Builtin::Symbol
- MathML::LaTeX::BuiltinCommands
- MathML::LaTeX::BuiltinEnvironments
- MathML::LaTeX::BuiltinGroups
- MathML::LaTeX::BuiltinGroups::CircularReferenceEnvironment
- MathML::LaTeX::EndMismatchToBegin
- MathML::LaTeX::EnvironmentNotEnd
- MathML::LaTeX::Font
- MathML::LaTeX::Macro
- MathML::LaTeX::Macro::Command
- MathML::LaTeX::Macro::Environment
- MathML::LaTeX::NeedParameter
- MathML::LaTeX::NotEnvironment
- MathML::LaTeX::OptionNotClosed
- MathML::LaTeX::ParseError
- MathML::LaTeX::Parser
- MathML::LaTeX::Parser::CircularReferenceCommand
- MathML::LaTeX::RE
- MathML::LaTeX::Scanner
- MathML::Line
- MathML::Math
- MathML::None
- MathML::Number
- MathML::Operator
- MathML::Over
- MathML::Root
- MathML::Row
- MathML::Space
- MathML::Sqrt
- MathML::String
- MathML::SubSup
- MathML::Symbol
- MathML::Symbol::CharacterReference
- MathML::Symbol::EntityReference
- MathML::Table
- MathML::Td
- MathML::Text
- MathML::Tr
- MathML::Under
- MathML::Util
- MathML::Util::MathData
- MathML::Util::SimpleLaTeX
- MathML::Variant
- MathML::XMLElement
- String

No matching classes.

# MathML::Util

### Constants

EQNARRAY_RE
ESCAPES
INVALID_RE
SINGLE_COMMAND_RE

### Public Class Methods

collect_regexp(a) click to toggle source

    # File lib/math_ml/util.rb, line 31
    def self.collect_regexp(a)
            if a
                    a = [a].flatten
                    a.size>0 ? Regexp.new(a.inject(""){|r, i| i.is_a?(Regexp) ? "#{r}#{i.to_s}|" : r}.chop) : INVALID_RE
            else
                    INVALID_RE
            end
    end

escapeXML(s, br=false) click to toggle source

    # File lib/math_ml/util.rb, line 22
    def self.escapeXML(s, br=false)
            r = s.gsub(/[<>&"']/){|m| "&#{ESCAPES[m]};"}
            br ? r.gsub(/\n/, "<br />\n") : r
    end

### Public Instance Methods

collect_regexp(a) click to toggle source

    # File lib/math_ml/util.rb, line 40
    def collect_regexp(a)
            MathML::Util.collect_regexp(a)
    end

escapeXML(s, br=false) click to toggle source

    # File lib/math_ml/util.rb, line 27
    def escapeXML(s, br=false)
            MathML::Util.escapeXML(s, br)
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.