svg_optimizer 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of svg_optimizer might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/lib/svg_optimizer/plugins/cleanup_id.rb +4 -0
- data/lib/svg_optimizer/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d073c9b9ff088b3c576f94153d0348deaf34b63c
|
4
|
+
data.tar.gz: 8a42f58ad3e662f9ea65165052369545cb72a3e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04a087bf54070bc012447cf2b72539f0c5bf026dd62e34f3b34df1695e36c5f408243a6f30283cd6a219c48ec928ec22213dc0bb3fb4861a8c3ff9886d815fe7
|
7
|
+
data.tar.gz: 061e9e44d325bc50d773460b9ecaadda9f705e1f3bb51bc86dea5502ae0ac3f72e64e71a6c55e811037d3ce976bf6c056248a277778d436b6c1c1fe81efa5377
|
@@ -19,6 +19,10 @@ module SvgOptimizer
|
|
19
19
|
# If there's a <script> or <style>, don't mess with ids.
|
20
20
|
return if xml.css("script, style").any?
|
21
21
|
|
22
|
+
# SVG can have ids as arrays.
|
23
|
+
# Skip id optimization if that's the case.
|
24
|
+
return if xml.css("[id^='[']").size.nonzero?
|
25
|
+
|
22
26
|
# Replace the ids otherwise.
|
23
27
|
xml.css("[id]").each(&method(:cleanup_id))
|
24
28
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: svg_optimizer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nando Vieira
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-10-
|
11
|
+
date: 2017-10-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|