anti_image_reflow 0.1.8 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2c55afc681dbcc018e08d8802f67bc07e0d4dc3585bdb5da4bf71af22a2a70bd
4
- data.tar.gz: c210e32e6341c03bf90c99368c9e474de277686838447820b0610b61282a2d50
3
+ metadata.gz: 003c601f030f3f1896ba1c04fb23ef59a08424ad5c237a977f538f47be345147
4
+ data.tar.gz: f3489307838c43dede5618f2f2c2505f13cf11c7d1e020a0119bb140879b144f
5
5
  SHA512:
6
- metadata.gz: bb60d6c45fc0bc8d4753b3c1c3a710482c47ef532d8e2eab369e800c1bfce1bcbbf3c848b8463b0fb595cacce1e7aecbe1aeb3f8c4f9f744d5e3fdf93d9a2a01
7
- data.tar.gz: 6db06910a32eaf251268c2ceaf08285cbdd410c754d81fb65028679a1f737fe4771cd72218ffa045e91aa9a8b6a64ce912311584323eace2532de6d31aaef858
6
+ metadata.gz: 9f720d1fb1ddd9fb8a51192dcc1008f17fcd237dff636ff4d4c7f7fe5fe5605ba6b3a156ddfb6daac2b0ce37078710cc9d310112ff006265435be88a0d701ad6
7
+ data.tar.gz: ff6a6ead7b17be5cce86647c85431f4ff4627cef99b05c4d1c882a4a29593a35cc3b4c3e002d5f63317b77658e551842ab1556561834cfdee777f2d4351c2685
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AntiImageReflow
4
- VERSION = "0.1.8"
4
+ VERSION = "0.1.9"
5
5
  end
@@ -30,9 +30,9 @@ module Jekyll
30
30
  if tag.name == "img"
31
31
  # get path relative to root
32
32
  path = File.join(Dir.pwd, tag["src"])
33
- # skip if directory
34
- next if File.directory?(path)
35
-
33
+ # skip if directory or invalid path
34
+ next if File.directory?(path) || !File.exist?(path)
35
+
36
36
  size = FastImage.size(path)
37
37
  tag["width"] = size[0] unless tag["width"] || size.nil?
38
38
  tag["height"] = size[1] unless tag["height"] || size.nil?
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: anti_image_reflow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zachary Smith