Method: IsoDoc::PresentationXMLConvert#eps_to_svg

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

#eps_to_svg(node) ⇒ Object



156
157
158
159
160
161
162
163
164
165
# File 'lib/isodoc/presentation_function/image.rb', line 156

def eps_to_svg(node)
  if !node.text.strip.empty? || %r{^data:}.match?(node["src"])
    return eps_to_svg_from_node(node)
  end

  target_path = imgfile_suffix(node["src"], "svg")
  return target_path if File.exist?(target_path)

  eps_to_svg_from_node(node, target_path)
end