lib/vectory/ps.rb in vectory-0.4.2 vs lib/vectory/ps.rb in vectory-0.5.0
- old
+ new
@@ -8,9 +8,18 @@
def self.mimetype
"application/postscript"
end
+ def self.from_node(node)
+ return from_content(node.children.to_xml) unless node.text.strip.empty?
+
+ uri = node["src"]
+ return Vectory::Datauri.new(uri).to_vector if %r{^data:}.match?(uri)
+
+ from_path(uri)
+ end
+
def to_eps
convert_with_inkscape("--export-type=eps", Eps)
end
def to_emf