pandocomatic 0.2.5.0 → 0.2.5.1
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 +4 -4
- data/lib/pandocomatic/pandoc_metadata.rb +23 -12
- data/lib/pandocomatic/pandocomatic.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d6a91e1ee77a00b1064990b56b389a42ac5d81941d77165c983b100ec1642d13
|
4
|
+
data.tar.gz: 56233af1ce48cc32a24aba970d08972760bd9b21c4fe31151bac14ceccae6c8e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3df9df16cc6950d3f58396b722fbcaa78a2d29fbb0ca9a9cebb9dd9d2c4cc1047c0f4a1bcfd8306b48559d6df6bfce327ff319116f0a6fc5ec5451af95578eda
|
7
|
+
data.tar.gz: bda77fdbe40a60ac3e4d9f681009b745f83769382de0d6d313a685a7545533ae1953b054a7cfdd29e404aab1fe1f22d416e3abae367d7acc9822af67d9ba794b
|
@@ -191,21 +191,32 @@ module Pandocomatic
|
|
191
191
|
|
192
192
|
pandocomatic_blocks = 0
|
193
193
|
|
194
|
-
metadata_blocks = metadata_blocks
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
194
|
+
metadata_blocks = metadata_blocks
|
195
|
+
.select {|m| not m.nil? and not m.empty?}
|
196
|
+
.each do |metadata|
|
197
|
+
metadata.delete_if do |key|
|
198
|
+
if key == "pandocomatic_" or key == "pandocomatic"
|
199
|
+
pandocomatic_blocks += 1
|
200
|
+
|
201
|
+
1 < pandocomatic_blocks
|
202
|
+
else
|
203
|
+
false
|
204
|
+
end
|
203
205
|
end
|
204
206
|
end
|
205
207
|
|
206
|
-
|
207
|
-
|
208
|
-
|
208
|
+
# According to the pandoc manual: "A document may contain multiple
|
209
|
+
# metadata blocks. The metadata fields will be combined through a
|
210
|
+
# left-biased union: if two metadata blocks attempt to set the
|
211
|
+
# same field, the value from the first block will be taken."
|
212
|
+
#
|
213
|
+
# Here we do the same
|
214
|
+
full_metadata = Hash.new
|
215
|
+
metadata_blocks
|
216
|
+
.reverse
|
217
|
+
.each {|block| full_metadata.merge!(block)}
|
218
|
+
|
219
|
+
yaml_string = YAML.dump(full_metadata) + "..."
|
209
220
|
|
210
221
|
return [yaml_string, pandocomatic_blocks]
|
211
222
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pandocomatic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.5.
|
4
|
+
version: 0.2.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Huub de Beer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-04-
|
11
|
+
date: 2019-04-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: paru
|
@@ -78,9 +78,9 @@ dependencies:
|
|
78
78
|
- - "~>"
|
79
79
|
- !ruby/object:Gem::Version
|
80
80
|
version: 0.9.18
|
81
|
-
description: Pandocomatic is a tool to automate using pandoc
|
82
|
-
|
83
|
-
|
81
|
+
description: Pandocomatic is a tool to automate using pandoc. With pandocomatic you
|
82
|
+
can express common patterns of using pandoc for generating your documents. Applied
|
83
|
+
to a directory, pandocomatic can act as a static site generator.
|
84
84
|
email: Huub@heerdebeer.org
|
85
85
|
executables:
|
86
86
|
- pandocomatic
|
@@ -154,10 +154,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
154
154
|
- !ruby/object:Gem::Version
|
155
155
|
version: '0'
|
156
156
|
requirements:
|
157
|
-
- pandoc, a universal document
|
157
|
+
- pandoc, a universal document converter
|
158
158
|
rubyforge_project:
|
159
159
|
rubygems_version: 2.7.7
|
160
160
|
signing_key:
|
161
161
|
specification_version: 4
|
162
|
-
summary:
|
162
|
+
summary: Automate the use of pandoc
|
163
163
|
test_files: []
|