class SpecialLatex
Public Class Methods
convert(str)
click to toggle source
# File lib/special_latex.rb, line 206 def self.convert(str) str.gsub(@command_regex) do |s| if @command_map.key?($1) then @command_map[$1] elsif not $4.empty? then combined = $1 + $4 if @ascii_map.key?(combined) then @ascii_map[combined] elsif @connecting_map.key?($1) then $4 + @connecting_map[$1] else s end else s end end end