Method: IsoDoc::PresentationXMLConvert#numberformat_extract

Defined in:
lib/isodoc/presentation_function/math.rb

#numberformat_extract(options) ⇒ Object



53
54
55
56
57
58
59
# File 'lib/isodoc/presentation_function/math.rb', line 53

def numberformat_extract(options)
  options.gsub!(/([a-z_]+)='/, %('\\1=))
  CSV.parse_line(options, quote_char: "'").each_with_object({}) do |x, acc|
    m = /^(.+?)=(.+)?$/.match(x) or next
    acc[m[1].to_sym] = m[2].sub(/^(["'])(.+)\1$/, "\\2")
  end
end