pandocomatic 0.2.4.1 → 0.2.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pandocomatic/configuration.rb +11 -28
- data/lib/pandocomatic/pandoc_metadata.rb +1 -1
- data/lib/pandocomatic/pandocomatic.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5805486820ab39b17105f8734d5a8bb06cd4974b504a433bfb2a8fd7257f1292
|
4
|
+
data.tar.gz: fac1b7cdaf0b6bde56c14b27cf69a8314a9cb8d61570ee0b9bae8fa24bc119a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c6af721ff587c11366cdec4bf08dea7d022d9e82b902f6ca4690864ebacdc463e8eed745158f8e1d716a98d755943cd8c0300b17d17b1145bc4940361648a4f0
|
7
|
+
data.tar.gz: 400a4e734a7bb904dac926a6fee4a35ca1f0622ff37cb202f7b9b61e33b94e8704aae94e601975228eeab2a7f06c1e0f81cc44e24b429a3a5026c8a55b29b5fd
|
@@ -245,22 +245,13 @@ module Pandocomatic
|
|
245
245
|
end
|
246
246
|
end
|
247
247
|
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
# Output option in pandoc property has precedence
|
252
|
-
if metadata.has_pandocomatic?
|
253
|
-
pandocomatic = metadata.pandocomatic
|
254
|
-
if pandocomatic.has_key? "pandoc"
|
255
|
-
pandoc = pandocomatic["pandoc"]
|
256
|
-
destination = determine_output_in_pandoc.call pandoc
|
257
|
-
rename_script = pandoc["rename"]
|
258
|
-
end
|
259
|
-
end
|
248
|
+
# Output options in pandoc property have precedence
|
249
|
+
destination = determine_output_in_pandoc.call metadata.pandoc_options
|
250
|
+
rename_script = metadata.pandoc_options["rename"]
|
260
251
|
|
261
252
|
# Output option in template's pandoc property is next
|
262
253
|
if destination.nil? and not template_name.nil? and not template_name.empty? then
|
263
|
-
if @templates[template_name].has_key? "pandoc"
|
254
|
+
if @templates[template_name].has_key? "pandoc" and not @templates[template_name]["pandoc"].nil?
|
264
255
|
pandoc = @templates[template_name]["pandoc"]
|
265
256
|
destination = determine_output_in_pandoc.call pandoc
|
266
257
|
rename_script ||= pandoc["rename"]
|
@@ -304,21 +295,14 @@ module Pandocomatic
|
|
304
295
|
end
|
305
296
|
|
306
297
|
if template_name.nil? or template_name.empty? then
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
if not ext.nil?
|
314
|
-
extension = ext
|
315
|
-
elsif pandoc.has_key? "to"
|
316
|
-
extension = strip_extensions.call(pandoc["to"])
|
317
|
-
end
|
318
|
-
end
|
319
|
-
end
|
298
|
+
ext = use_extension.call metadata.pandoc_options
|
299
|
+
if not ext.nil?
|
300
|
+
extension = ext
|
301
|
+
elsif metadata.pandoc_options.has_key? "to"
|
302
|
+
extension = strip_extensions.call(metadata.pandoc_options["to"])
|
303
|
+
end
|
320
304
|
else
|
321
|
-
if @templates[template_name].has_key? "pandoc"
|
305
|
+
if @templates[template_name].has_key? "pandoc" and not @templates[template_name]["pandoc"].nil?
|
322
306
|
pandoc = @templates[template_name]["pandoc"]
|
323
307
|
ext = use_extension.call pandoc
|
324
308
|
|
@@ -685,6 +669,5 @@ module Pandocomatic
|
|
685
669
|
path.start_with? "/"
|
686
670
|
end
|
687
671
|
end
|
688
|
-
|
689
672
|
end
|
690
673
|
end
|
@@ -159,7 +159,7 @@ module Pandocomatic
|
|
159
159
|
# @return [Boolean] True if there is a pandoc options property in this
|
160
160
|
# PandocMetadata object. False otherwise.
|
161
161
|
def has_pandoc_options?()
|
162
|
-
has_pandocomatic? and pandocomatic.has_key? 'pandoc'
|
162
|
+
has_pandocomatic? and pandocomatic.has_key? 'pandoc' and not pandocomatic['pandoc'].nil?
|
163
163
|
end
|
164
164
|
|
165
165
|
end
|
@@ -50,7 +50,7 @@ module Pandocomatic
|
|
50
50
|
ERROR_STATUS = 1266 # This is the sum of the ascii values of the characters in 'pandocomatic'
|
51
51
|
|
52
52
|
# Pandocomatic's current version
|
53
|
-
VERSION = [0, 2, 4,
|
53
|
+
VERSION = [0, 2, 4, 2]
|
54
54
|
|
55
55
|
# Pandocomatic's default configuration file
|
56
56
|
CONFIG_FILE = 'pandocomatic.yaml'
|
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.4.
|
4
|
+
version: 0.2.4.2
|
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-03-
|
11
|
+
date: 2019-03-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: paru
|