metanorma 1.6.7 → 1.6.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
  SHA256:
3
- metadata.gz: da01eef341e191e1e5feb7181afa5341ec66ff9b81792aace74bdcfc58a9690e
4
- data.tar.gz: 36ab1f699a49b800cbeef67950e595f8306980b0406d8d0227d8570bf4581abc
3
+ metadata.gz: bf166190b283c36393cece711e1b6d3210d06a12a577c0f64bbfca206131d561
4
+ data.tar.gz: e56840a0ca18bf19dd734deeec0b9a0eae1acb167815562f334ccdb413e22400
5
5
  SHA512:
6
- metadata.gz: 2c3a0595febda908e72b2e1075e8ac54955c00fbcbedb06a312f19f162c08de69f54ff0db365c76eece70743b0ffea5b68f67cce4e95e2b5c9261236b895e63a
7
- data.tar.gz: a8065d8df08ade6c95ec184dd0d428c09aab5aadab74b0198280a95e9263c3794135b72139039cd7306168d26c8dc99daee8fc4ef869de4d3413b93c8929869d
6
+ metadata.gz: 01d4d3a2840c7c4d2034c189f934dcb888bb602e8b6ee8c2d3e6c158711db7d7fa17b59c01dd634877ee9b0c4f849819c4b69a401f6a95d0818ad41236753e5d
7
+ data.tar.gz: 1e05a6d9992739869bdb53ec0ddbc43bab58fb5b08f0eb2730d5317954c7a3970c8992c1443808e3abd5a82908037cebe7f942acc6aae26e6c680e1103caa59d
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.9".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.9
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-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor