metanorma 1.5.3 → 1.5.5
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6b89c521393022873c1869075ea123a814f157c5bf37cbd4f8b9f34076396a0e
|
|
4
|
+
data.tar.gz: b289b1718e6b24dd672ec758210ac483370b5fd56d583d8e6c7d06d3bfceca9d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e914e35240ed44db0d6b822d83e9bfca1fb0573c37b054ba0f343df5378364a41c3f1f7f37634b5cc592111eea696128909c2c2f78667ba96da8ea86fea3f1d4
|
|
7
|
+
data.tar.gz: a74dedfd28fb9281a729a26de8c020d560cbc298ec23172db5d6425298094f085a79ee08c76d67da7af3f1b524eb20001f9e5b9e16b63e2c286fb041e0124edd
|
|
@@ -119,10 +119,7 @@ module Metanorma
|
|
|
119
119
|
|
|
120
120
|
def add_document_suffix(identifier, doc)
|
|
121
121
|
document_suffix = Metanorma::Utils::to_ncname(identifier)
|
|
122
|
-
|
|
123
|
-
%w[review to], %w[index to], %w[xref target],
|
|
124
|
-
%w[callout target]]
|
|
125
|
-
.each do |(tag_name, attribute_name)|
|
|
122
|
+
Metanorma::Utils::anchor_attributes.each do |(tag_name, attribute_name)|
|
|
126
123
|
add_suffix_to_attributes(doc, document_suffix, tag_name, attribute_name)
|
|
127
124
|
end
|
|
128
125
|
end
|
data/lib/metanorma/compile.rb
CHANGED
|
@@ -42,7 +42,7 @@ module Metanorma
|
|
|
42
42
|
when ".adoc" then process_input_adoc(filename, options)
|
|
43
43
|
when ".xml" then process_input_xml(filename, options)
|
|
44
44
|
else
|
|
45
|
-
Util.log("[metanorma] Error: file extension #{extname} "\
|
|
45
|
+
Util.log("[metanorma] Error: file extension #{extname} " \
|
|
46
46
|
"is not supported.", :error)
|
|
47
47
|
nil
|
|
48
48
|
end
|
|
@@ -150,7 +150,8 @@ module Metanorma
|
|
|
150
150
|
isodoc_options1)
|
|
151
151
|
wrap_html(options1, fnames1[:ext], fnames1[:out])
|
|
152
152
|
rescue StandardError => e
|
|
153
|
-
|
|
153
|
+
strict = ext == :presentation || isodoc_options1[:strict] == "true"
|
|
154
|
+
isodoc_error_process(e, strict)
|
|
154
155
|
end
|
|
155
156
|
|
|
156
157
|
def process_output_unthreaded(ext, fnames, isodoc, isodoc_options)
|
|
@@ -158,18 +159,19 @@ module Metanorma
|
|
|
158
159
|
isodoc_options)
|
|
159
160
|
nil # return as Thread
|
|
160
161
|
rescue StandardError => e
|
|
161
|
-
|
|
162
|
+
strict = ext == :presentation || isodoc_options[:strict] == "true"
|
|
163
|
+
isodoc_error_process(e, strict)
|
|
162
164
|
end
|
|
163
165
|
|
|
164
166
|
private
|
|
165
167
|
|
|
166
|
-
def isodoc_error_process(err)
|
|
167
|
-
if err.message.include?
|
|
168
|
+
def isodoc_error_process(err, strict)
|
|
169
|
+
if strict || err.message.include?("Fatal:")
|
|
168
170
|
@errors << err.message
|
|
169
171
|
else
|
|
170
172
|
puts err.message
|
|
171
|
-
puts err.backtrace.join("\n")
|
|
172
173
|
end
|
|
174
|
+
puts err.backtrace.join("\n")
|
|
173
175
|
end
|
|
174
176
|
|
|
175
177
|
# @param options [Hash]
|
|
@@ -72,7 +72,7 @@ module Metanorma
|
|
|
72
72
|
ret[:datauriimage] = true if options[:datauriimage]
|
|
73
73
|
ret[:sourcefilename] = options[:filename]
|
|
74
74
|
%i(bare sectionsplit no_install_fonts baseassetpath aligncrosselements
|
|
75
|
-
tocfigures toctables tocrecommendations)
|
|
75
|
+
tocfigures toctables tocrecommendations strict)
|
|
76
76
|
.each { |x| ret[x] ||= options[x] }
|
|
77
77
|
ext == :pdf && FontistUtils.has_fonts_manifest?(@processor, options) and
|
|
78
78
|
ret[:mn2pdf] =
|
|
@@ -70,11 +70,11 @@ module Metanorma
|
|
|
70
70
|
pdf-allow-print pdf-allow-print-hq pdf-allow-fill-in-forms
|
|
71
71
|
fonts font-license-agreement pdf-allow-access-content
|
|
72
72
|
pdf-encrypt-metadata iso-word-template document-scheme
|
|
73
|
-
localize-number iso-word-bg-strip-color
|
|
74
|
-
|
|
73
|
+
localize-number iso-word-bg-strip-color modspec-identifier-base
|
|
74
|
+
).freeze
|
|
75
75
|
|
|
76
76
|
EMPTY_ADOC_OPTIONS_DEFAULT_TRUE =
|
|
77
|
-
%w(data-uri-image suppress-asciimath-dup use-xinclude).freeze
|
|
77
|
+
%w(data-uri-image suppress-asciimath-dup use-xinclude source-highlighter).freeze
|
|
78
78
|
|
|
79
79
|
EMPTY_ADOC_OPTIONS_DEFAULT_FALSE =
|
|
80
80
|
%w(hierarchical-assets break-up-urls-in-tables toc-figures
|
|
@@ -93,25 +93,14 @@ module Metanorma
|
|
|
93
93
|
end
|
|
94
94
|
ret2 = EMPTY_ADOC_OPTIONS_DEFAULT_TRUE.each_with_object({}) do |w, acc|
|
|
95
95
|
m = /\n:#{w}:([^\n]*)\n/.match(header) || [nil, "true"]
|
|
96
|
-
#require "debug" binding.b if w == "break-up-urls-in-tables"
|
|
97
96
|
acc[attr_name_normalise(w)] = (m[1].strip != "false")
|
|
98
97
|
end
|
|
99
98
|
ret3 = EMPTY_ADOC_OPTIONS_DEFAULT_FALSE.each_with_object({}) do |w, acc|
|
|
100
99
|
m = /\n:#{w}:([^\n]*)\n/.match(header) || [nil, "false"]
|
|
101
|
-
#require "debug" binding.b if w == "break-up-urls-in-tables"
|
|
102
100
|
acc[attr_name_normalise(w)] = !["false"].include?(m[1].strip)
|
|
103
101
|
end
|
|
104
102
|
ret.merge(ret2).merge(ret3).compact
|
|
105
103
|
end
|
|
106
|
-
|
|
107
|
-
# ret.merge(
|
|
108
|
-
# datauriimage: defined?(datauriimage) ? datauriimage != "false" : true,
|
|
109
|
-
# suppressasciimathdup: defined?(suppress_asciimath_dup) ? suppress_asciimath_dup != "false" : nil,
|
|
110
|
-
# hierarchical_assets: defined?(hier_assets) ? hier_assets : nil,
|
|
111
|
-
# use_xinclude: defined?(use_xinclude) ? use_xinclude : nil,
|
|
112
|
-
# break_up_urls_in_tables: defined?(break_up) ? break_up : nil,
|
|
113
|
-
# ).compact
|
|
114
|
-
# end
|
|
115
104
|
end
|
|
116
105
|
end
|
|
117
106
|
end
|
data/lib/metanorma/version.rb
CHANGED
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.5.
|
|
4
|
+
version: 1.5.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2023-01-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: asciidoctor
|
|
@@ -311,7 +311,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
311
311
|
- !ruby/object:Gem::Version
|
|
312
312
|
version: '0'
|
|
313
313
|
requirements: []
|
|
314
|
-
rubygems_version: 3.3.
|
|
314
|
+
rubygems_version: 3.3.26
|
|
315
315
|
signing_key:
|
|
316
316
|
specification_version: 4
|
|
317
317
|
summary: Metanorma is the standard of standards; the metanorma gem allows you to create
|