phantompdf 1.0.3 → 1.0.4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3b1dce9a0f9ad3bc7f5a86520f0f73f54d7ae377
4
- data.tar.gz: a08c72427bfcb0c66897eba3d5a04e60720da311
3
+ metadata.gz: 85d23e201ff67bfa2a2cb062598958f3e20692ac
4
+ data.tar.gz: f3131136cd9d8fe3dbaa42d2035f8075181c3204
5
5
  SHA512:
6
- metadata.gz: 544666b16d0ce3639078ed7bf20945ce722e944633b72babb0e9248e4611f11d7febf5bd8d24af2345fe9f2e4363a102acae256f3e72a1ef104c899aaac519a0
7
- data.tar.gz: b1fcf15eeea1eb265080c767377a7e3059cef4e7b20db8f8a88e7aebb4f5b87c29e1137d3223b9f150eb2144e15b2a21dfae76f4f1e73b56985ae47033115f93
6
+ metadata.gz: e34b9946fa33849e77fc81da9249dbca22976d6894b8d785335de4942b3151063f3f28582e135b01ad5c52e995ebf0b69c86d1688965967262cf7b00a94a5149
7
+ data.tar.gz: 6a10d61088b8d8583a33ca4182f879a49e530979a726174253df0318362a631e29248515cdf63124b190cf43cd79f32a904914907f7f1401dc393b9d4a1cf626
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- phantompdf (1.0.3)
4
+ phantompdf (1.0.4)
5
5
  json
6
6
  phantomjs
7
7
 
@@ -1,3 +1,3 @@
1
1
  module PhantomPDF
2
- VERSION = "1.0.3"
2
+ VERSION = "1.0.4"
3
3
  end
@@ -18,12 +18,14 @@ var // PhantomJS CAN NOT handle images in custom header/footer,
18
18
 
19
19
  extract_images = function(html){
20
20
  var image_tags = html.match(/<img[^>]+?src=(["'])https?:\/\/[^>]+?\1[^>]*?\/?>/ig),
21
- image_tags_len = image_tags.length,
21
+ image_tags_len,
22
22
  i, image;
23
- if (image_tags_len < 1) {
23
+ if (image_tags === null) {
24
24
  return;
25
25
  }
26
26
 
27
+ image_tags_len = image_tags.length;
28
+
27
29
  for (i=0; i<image_tags_len; i++) {
28
30
  image = image_tags[i].match(/src=(["'])(https?:\/\/[^>]+?)\1/i);
29
31
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phantompdf
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Spring MC