pandocomatic 0.1.4.8 → 0.1.4.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
  SHA1:
3
- metadata.gz: b0734cbbb6eb522f731ca8327ab9fcf5ae511a98
4
- data.tar.gz: e8f266ce4bece89cd72b6d9a01bde7b0a87685d8
3
+ metadata.gz: b790fdc99211b28030f3e6c2fb83ec9a68dcbf2c
4
+ data.tar.gz: b3bce488828fd3f610b922d012022b9fa2c880ff
5
5
  SHA512:
6
- metadata.gz: bbfc1ed17b98565d55972b95827438153e9d7b9d06a81432f69275c86e9f91ab10c848fe468f683596eae82a79e09830589aa33e18b647bac0906eb9ddb8af32
7
- data.tar.gz: afde83d1a2639beb117f86349c241289df49c66e5654da6e9a8aac4efb9db513fe3cf891e30b8d9af22a7ff03ae4434a75ebc080e840c3fb067bb86943d2445e
6
+ metadata.gz: daa6fea415f430f87d4806e15d405a8b2bd469005eec21530c1799ccde8dc19736ff8af34559a0d91e1ef6f9814531193301697c8f209bbb75dcd1f655672ac3
7
+ data.tar.gz: cd9553189cb5f60350073d79192980e5ed4d205df5f79cf87a582f1bf6177b91fa875e535e6d05a722e80de93aa2ab6bca704c5e705773214bf693d4c9553a58
@@ -21,6 +21,7 @@ module Pandocomatic
21
21
  require 'json'
22
22
  require 'yaml'
23
23
  require 'paru'
24
+ require 'paru/pandoc2yaml'
24
25
 
25
26
  require_relative './error/pandoc_error.rb'
26
27
  require_relative './error/io_error.rb'
@@ -29,20 +30,12 @@ module Pandocomatic
29
30
 
30
31
  def self.extract_metadata input_document
31
32
  begin
32
- pandoc2yaml File.read(input_document)
33
+ Paru::Pandoc2Yaml.extract_metadata(input_document)
33
34
  rescue StandardError => e
34
35
  raise IOError.new(:error_opening_file, e, input_document)
35
36
  end
36
37
  end
37
38
 
38
- def self.pandoc2yaml(input)
39
- input
40
- .scan(/^---[ \t]*\n(.+?)^(?:---|\.\.\.)[ \t]*\n/m)
41
- .flatten
42
- .map{|yaml| yaml.strip}
43
- .join("\n")
44
- end
45
-
46
39
  # Collect the metadata embedded in the src file
47
40
  def self.load_file src
48
41
  yaml_metadata = extract_metadata src
@@ -44,7 +44,7 @@ module Pandocomatic
44
44
  require_relative './command/convert_file_multiple_command.rb'
45
45
 
46
46
  class Pandocomatic
47
- VERSION = [0, 1, 4, 8]
47
+ VERSION = [0, 1, 4, 9]
48
48
  CONFIG_FILE = 'pandocomatic.yaml'
49
49
 
50
50
  def self.run(args)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pandocomatic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4.8
4
+ version: 0.1.4.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Huub de Beer