svg_optimizer 0.2.2 → 0.2.3

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: 8b58103eace64dcab3740e83ce4a1c328dd6ae06
4
- data.tar.gz: 68ee27f69693afcd6eab21e0b1ffa57905d1c90b
3
+ metadata.gz: d073c9b9ff088b3c576f94153d0348deaf34b63c
4
+ data.tar.gz: 8a42f58ad3e662f9ea65165052369545cb72a3e0
5
5
  SHA512:
6
- metadata.gz: '08e57257160f937494ee265a804e887033e59246d1e5a74b903ba99d8a5b4bc47687fd0e0ad9f1affa4afee2c6aa4bbd0d37c1ef5be1fe2d0036473f83c983b5'
7
- data.tar.gz: f6b6caf4b7ff9f4ae069d23a1c22267e55cde26d134fc2368ff5f26efabd767e03687a1e1c21060a9313124e12c14809498e9128f2dd72201fb71e1830fc7a57
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SvgOptimizer
4
- VERSION = "0.2.2".freeze
4
+ VERSION = "0.2.3".freeze
5
5
  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.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-01 00:00:00.000000000 Z
11
+ date: 2017-10-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri