md2key 0.9.5 → 0.10.0

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: f3f2507bf59d5de3317e603cc333f23de9e4c022e881250f8577eb349e232c35
4
- data.tar.gz: 62f934e487e63bd750b611da012eea6de9284630d290354883939ddbc73ae1f9
3
+ metadata.gz: ad6034c87205238cf1b4d7ebfca1d9f29656107335dbe2aedd23aa46a5bf3425
4
+ data.tar.gz: b12405ef5a7e773d4f53d760d44cdc96717f2d89de04675ee8f13ce9d70549b0
5
5
  SHA512:
6
- metadata.gz: 12f4764db23c38cd55344e70d2422bfd62bd7075e42975d52406d9593008777c7e348fc23381b8e08bb8ccd27e18a05849e5f8c4d1d939a972a336ee2b20b26f
7
- data.tar.gz: 2aaed63195590d65e5890b0580273045effa5ce7702a5aab4ab557ccb2d2d52dc9e13b21826b6b9fdf4d9c6012c46392dc38d20bcc9c0ac5f56c650751d73c80
6
+ metadata.gz: 7d16d940f67df5e99d0aac0094a5257060d75c0f8b90ddd3eeb8fc4bb8734db649732473cc57c3d2f2ab1ae30d3d6e3b976dec7c1062e79837418c3617cd2da3
7
+ data.tar.gz: 0a48ae9002f1ef4520d8b1156fc2c16d97ab12a76e236909e7701a0bb676e07839ae0d4b735b65b7226bada981eba75d823f17bc780665046bc6da380a1b0967
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ # v0.10.0
2
+
3
+ - Switch from `mermaid` to `mmdc` to support newer Mermaid
4
+ https://github.com/k0kubun/md2key/pull/48
5
+
1
6
  # v0.9.5
2
7
 
3
8
  - Fix keyword argument errors with slide theme selection for Ruby 3
@@ -14,8 +14,9 @@ module Md2key
14
14
 
15
15
  output_dir = File.dirname(file.path)
16
16
  image_path = ""
17
- IO.popen("mermaid #{file.path} | grep 'saved png' | awk -F':' '\{print $2\}'", 'r+') do |info|
18
- image_path = info.read.strip
17
+ IO.popen("mmdc -i #{file.path} --output #{file.path}.png", 'r') do |info|
18
+ info.read
19
+ image_path = "#{file.path}.png"
19
20
  file.unlink
20
21
  end
21
22
 
@@ -25,9 +26,9 @@ module Md2key
25
26
  private
26
27
 
27
28
  def ensure_mermaid_availability
28
- return if system('which -s mermaid')
29
+ return if system('which -s mmdc')
29
30
 
30
- abort "`mermaid` is not available. Try `npm install -g phantomjs mermaid`."
31
+ abort "`mmdc` is not available. Try `npm install -g mermaid.cli`."
31
32
  end
32
33
  end
33
34
  end
@@ -1,3 +1,3 @@
1
1
  module Md2key
2
- VERSION = '0.9.5'
2
+ VERSION = '0.10.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: md2key
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.5
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takashi Kokubun