svg_optimizer 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of svg_optimizer might be problematic. Click here for more details.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d3f96c3fad6ba2b506bf3f6cf7b36eb040944125
|
4
|
+
data.tar.gz: 268be369b5313dbce1c1dbde5ff5bc8bdcaa4838
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 398a67942d5b8dccb24cbd5b0edd0deadeba51c60f17380ec9846079b05db9b66050271f973ac872c788e84159dd81991b8fb186284151a53b0a7819a7169eaa
|
7
|
+
data.tar.gz: a63c514ed5b9b288a6cfcc0f72b06f40cbaaed7426d1e7e7873c962fd49770ab9f33146b01fbad3b5459282e75178a9ae39db518a873730591fb3202708d89e0
|
@@ -13,6 +13,7 @@ module SvgOptimizer
|
|
13
13
|
|
14
14
|
def remove_unused_ns(ns)
|
15
15
|
return if xml.xpath("//#{ns.prefix}:*").any?
|
16
|
+
return if xml.xpath("//@*[namespace-uri()='#{ns.href}']").any?
|
16
17
|
|
17
18
|
source = xml.root.to_s.gsub(/ *xmlns:#{ns.prefix}=".*?"/, "")
|
18
19
|
xml.root = Nokogiri::XML(source).root
|