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 +4 -4
- data/lib/jekyll/diagrams/diag.rb +2 -2
- data/lib/jekyll/diagrams/graphviz.rb +4 -2
- data/lib/jekyll/diagrams/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b8067f8688edbdf346d3285f4c2b52772ec86db8
|
4
|
+
data.tar.gz: 70af8c3756540f8f982a98e782db25b58ec7489a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21d757d03dd1bdce39a706df5dec925c5ff0b9f18455004e3be520c2b88a861f299e5219d722e88f33cd902b4f12e763e24bc1b570fb73934ddf6b73eeaf8c99
|
7
|
+
data.tar.gz: 23982fafeac9f1c6c79c39d6792aee6f647e9cb92bbd1399552751d4cbf1dff95f7fe6766b152366aa69c181153de4b77c4c1c999c5ef0ed2c0bb5c5ab5f5eee
|
data/lib/jekyll/diagrams/diag.rb
CHANGED
@@ -34,14 +34,14 @@ module Jekyll
|
|
34
34
|
end
|
35
35
|
|
36
36
|
def render(code, engine)
|
37
|
-
tmp =
|
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.
|
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)
|