Module: Mathemagical
- Defined in:
- lib/mathemagical.rb,
lib/mathemagical/latex.rb,
lib/mathemagical/string.rb,
lib/mathemagical/element.rb,
lib/mathemagical/symbol/utf8.rb,
lib/mathemagical/symbol/entity_reference.rb,
lib/mathemagical/symbol/character_reference.rb
Defined Under Namespace
Modules: Align, LaTeX, Line, String, Symbol, Util, Variant Classes: Break, Element, Error, Fenced, Frac, Identifier, Math, None, Number, Operator, Over, Root, Row, Space, Sqrt, SubSup, Table, Td, Text, Tr, Under
Constant Summary collapse
- VERSION =
'0.0.1'
Class Method Summary collapse
Class Method Details
.encode(s) ⇒ Object
14 15 16 17 18 19 |
# File 'lib/mathemagical.rb', line 14 def self.encode(s) @entities ||= HTMLEntities.new # TODO: HTMLEntities Y U DOUBLE ENCODE?? @entities.encode(s).gsub(/&([#a-zA-Z0-9]{2,24});/, '&\1;') end |