jekyll-diagrams 0.2.2 → 0.2.3

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
  SHA1:
3
- metadata.gz: 4c6675b0ac520e97b2996c72923471a10a1ccfd0
4
- data.tar.gz: 762740eac4ecc614179150a95b390b6ff2bf4067
3
+ metadata.gz: b8067f8688edbdf346d3285f4c2b52772ec86db8
4
+ data.tar.gz: 70af8c3756540f8f982a98e782db25b58ec7489a
5
5
  SHA512:
6
- metadata.gz: 6621464da76326d77e99ddb3601ade0da273295b5d66cfc87b85d48582ea1c5c2c028e5c1514aff2c0ecc6e43f0d36c7d6e61d6e33e171cfe351514d39912db8
7
- data.tar.gz: 66c1a1f58cbd1ad98f876ff0b9d2c274e85082371c5944969d10e309481c2c5d25cd901accb1ac16d9e1a45e89216d5f3279805617e5c4ba13c59c63fa195fc7
6
+ metadata.gz: 21d757d03dd1bdce39a706df5dec925c5ff0b9f18455004e3be520c2b88a861f299e5219d722e88f33cd902b4f12e763e24bc1b570fb73934ddf6b73eeaf8c99
7
+ data.tar.gz: 23982fafeac9f1c6c79c39d6792aee6f647e9cb92bbd1399552751d4cbf1dff95f7fe6766b152366aa69c181153de4b77c4c1c999c5ef0ed2c0bb5c5ab5f5eee
@@ -34,14 +34,14 @@ module Jekyll
34
34
  end
35
35
 
36
36
  def render(code, engine)
37
- tmp = Temfile.new(engine).path
37
+ tmp = Tempfile.new(engine).path
38
38
  dest = "#{tmp}.svg"
39
39
 
40
40
  File.write(tmp, code)
41
41
  cmd = "#{engine} #{@config['options']} #{tmp} -o #{dest}"
42
42
  ret, status = Open3.capture2(cmd, binmode: true)
43
43
 
44
- if !status.success
44
+ if !status.success?
45
45
  raise "Non-zero exit status '#{cmd}': #{status}"
46
46
  end
47
47
 
@@ -53,7 +53,7 @@ module Jekyll
53
53
  binmode: true
54
54
  )
55
55
 
56
- if !status.success
56
+ if !status.success?
57
57
  raise "Non-zero exit status '#{cmd}': #{status}"
58
58
  end
59
59
 
@@ -66,7 +66,9 @@ module Jekyll
66
66
  private
67
67
 
68
68
  def strip_metainfo(svg)
69
- svg.gsub(/( :.*\n){6}/, '')
69
+ svg.sub(/([^\n]*\n){6}/, '')
70
+ .sub(%[xmlns="http://www.w3.org/2000/svg"], '')
71
+ .sub(%[xmlns:xlink="http://www.w3.org/1999/xlink"], '')
70
72
  end
71
73
 
72
74
  def wrap_div(svg)
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module Diagrams
3
- VERSION = "0.2.2"
3
+ VERSION = "0.2.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-diagrams
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
  - farkasity