metanorma 1.6.7 → 1.6.8

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: da01eef341e191e1e5feb7181afa5341ec66ff9b81792aace74bdcfc58a9690e
4
- data.tar.gz: 36ab1f699a49b800cbeef67950e595f8306980b0406d8d0227d8570bf4581abc
3
+ metadata.gz: 62515490978dfce5108f674bf4dbee7efde188185fc16b081270dd3ea1d288cc
4
+ data.tar.gz: 6b72aac716ff0aa8faf39aed01b59b75fd068f866096aef735f89767ce6f92ea
5
5
  SHA512:
6
- metadata.gz: 2c3a0595febda908e72b2e1075e8ac54955c00fbcbedb06a312f19f162c08de69f54ff0db365c76eece70743b0ffea5b68f67cce4e95e2b5c9261236b895e63a
7
- data.tar.gz: a8065d8df08ade6c95ec184dd0d428c09aab5aadab74b0198280a95e9263c3794135b72139039cd7306168d26c8dc99daee8fc4ef869de4d3413b93c8929869d
6
+ metadata.gz: 7e9b1a354d205379931f34f89c3af5cb869671c4d124ef15f09a7ccc1aaca3603c2d832ec57fb1be99a074905642a03b0d5820847285ff01d80cf92daa438350
7
+ data.tar.gz: cfbec2def4806aaad3ab088086928e042b3e55278871710b1b1be4cd4223ee6cc0693d0557117d82686afe1cbfa46dca209f112fba602d356e0dc106e4091420
data/Gemfile CHANGED
@@ -4,9 +4,12 @@ Encoding.default_internal = Encoding::UTF_8
4
4
  source "https://rubygems.org"
5
5
  git_source(:github) { |repo| "https://github.com/#{repo}" }
6
6
 
7
- gemspec
7
+ group :development, :test do
8
+ gem "rspec"
9
+ end
8
10
 
9
11
  if File.exist? "Gemfile.devel"
10
12
  eval File.read("Gemfile.devel"), nil, "Gemfile.devel" # rubocop:disable Security/Eval
11
13
  end
12
14
 
15
+ gemspec
@@ -67,16 +67,27 @@ module Metanorma
67
67
 
68
68
  def get_isodoc_options(file, options, ext)
69
69
  ret = @processor.extract_options(file)
70
+ copy_isodoc_options_attrs(options, ret)
71
+ font_manifest_mn2pdf(options, ret, ext)
72
+ ret[:output_formats].select! do |k, _|
73
+ options[:extension_keys].include?(k)
74
+ end
75
+ ret
76
+ end
77
+
78
+ def copy_isodoc_options_attrs(options, ret)
70
79
  ret[:datauriimage] = true if options[:datauriimage]
71
80
  ret[:sourcefilename] = options[:filename]
72
81
  %i(bare sectionsplit no_install_fonts baseassetpath aligncrosselements
73
82
  tocfigures toctables tocrecommendations strict)
74
83
  .each { |x| ret[x] ||= options[x] }
84
+ end
85
+
86
+ def font_manifest_mn2pdf(options, ret, ext)
75
87
  custom_fonts = FontistUtils.has_custom_fonts?(@processor, options, ret)
76
- ext == :pdf && custom_fonts &&
77
- ret[:mn2pdf] =
78
- { font_manifest: FontistUtils.location_manifest(@processor, ret) }
79
- ret
88
+ ext == :pdf && custom_fonts and
89
+ ret[:mn2pdf] = { font_manifest: FontistUtils
90
+ .location_manifest(@processor, ret) }
80
91
  end
81
92
  end
82
93
  end
@@ -35,7 +35,7 @@ module Metanorma
35
35
  end
36
36
 
37
37
  def options_preprocess(options)
38
- options[:output_formats] = output_formats
38
+ options[:output_formats] ||= output_formats
39
39
  end
40
40
 
41
41
  def output(isodoc_node, _inname, outname, _format, _options = {})
@@ -1,3 +1,3 @@
1
1
  module Metanorma
2
- VERSION = "1.6.7".freeze
2
+ VERSION = "1.6.8".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.7
4
+ version: 1.6.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-20 00:00:00.000000000 Z
11
+ date: 2023-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor