pandocomatic 0.2.5.0.beta → 0.2.5.0.betaa
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 +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 33cabeb7b49bddf1b107c44ebf448f07c1f8f33503d620c8d68eac2d23b216dd
|
4
|
+
data.tar.gz: 39f12455e1105aca31e552ec8d3fac810a4aa60a5041c11c84fb5088dde94dde
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 677152a5dde3f7359a75b44a4c678673a45d64bc917770d9bccbe9d43d70ff8fd25cb18b1a567b2fb095d52c969ef264c91eb4c49a9cf188c342da01d9dd51d2
|
7
|
+
data.tar.gz: fccd7849c1cd7de73d3310b13785228bc91df4e89372c0f0bdc8aed52ed1355133032280d61f322217e76472cc39269d5555e5d1e8cb3a3ce16dbae7799f448b
|
@@ -385,22 +385,13 @@ module Pandocomatic
|
|
385
385
|
end
|
386
386
|
end
|
387
387
|
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
# Output option in pandoc property has precedence
|
392
|
-
if metadata.has_pandocomatic?
|
393
|
-
pandocomatic = metadata.pandocomatic
|
394
|
-
if pandocomatic.has_key? "pandoc"
|
395
|
-
pandoc = pandocomatic["pandoc"]
|
396
|
-
destination = determine_output_in_pandoc.call pandoc
|
397
|
-
rename_script = pandoc["rename"]
|
398
|
-
end
|
399
|
-
end
|
388
|
+
# Output options in pandoc property have precedence
|
389
|
+
destination = determine_output_in_pandoc.call metadata.pandoc_options
|
390
|
+
rename_script = metadata.pandoc_options["rename"]
|
400
391
|
|
401
392
|
# Output option in template's pandoc property is next
|
402
393
|
if destination.nil? and not template_name.nil? and not template_name.empty? then
|
403
|
-
if @templates[template_name].has_key? "pandoc"
|
394
|
+
if @templates[template_name].has_key? "pandoc" and not @templates[template_name]["pandoc"].nil?
|
404
395
|
pandoc = @templates[template_name]["pandoc"]
|
405
396
|
destination = determine_output_in_pandoc.call pandoc
|
406
397
|
rename_script ||= pandoc["rename"]
|
@@ -444,21 +435,14 @@ module Pandocomatic
|
|
444
435
|
end
|
445
436
|
|
446
437
|
if template_name.nil? or template_name.empty? then
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
if not ext.nil?
|
454
|
-
extension = ext
|
455
|
-
elsif pandoc.has_key? "to"
|
456
|
-
extension = strip_extensions.call(pandoc["to"])
|
457
|
-
end
|
458
|
-
end
|
459
|
-
end
|
438
|
+
ext = use_extension.call metadata.pandoc_options
|
439
|
+
if not ext.nil?
|
440
|
+
extension = ext
|
441
|
+
elsif metadata.pandoc_options.has_key? "to"
|
442
|
+
extension = strip_extensions.call(metadata.pandoc_options["to"])
|
443
|
+
end
|
460
444
|
else
|
461
|
-
if @templates[template_name].has_key? "pandoc"
|
445
|
+
if @templates[template_name].has_key? "pandoc" and not @templates[template_name]["pandoc"].nil?
|
462
446
|
pandoc = @templates[template_name]["pandoc"]
|
463
447
|
ext = use_extension.call pandoc
|
464
448
|
|
@@ -884,6 +868,5 @@ module Pandocomatic
|
|
884
868
|
|
885
869
|
path
|
886
870
|
end
|
887
|
-
|
888
871
|
end
|
889
872
|
end
|
@@ -170,7 +170,7 @@ module Pandocomatic
|
|
170
170
|
# @return [Boolean] True if there is a pandoc options property in this
|
171
171
|
# PandocMetadata object. False otherwise.
|
172
172
|
def has_pandoc_options?()
|
173
|
-
has_pandocomatic? and pandocomatic.has_key? 'pandoc'
|
173
|
+
has_pandocomatic? and pandocomatic.has_key? 'pandoc' and not pandocomatic['pandoc'].nil?
|
174
174
|
end
|
175
175
|
|
176
176
|
end
|