metanorma 2.2.7 → 2.2.9
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 +4 -4
- data/lib/metanorma/collection/collection.rb +2 -0
- data/lib/metanorma/collection/renderer/fileparse.rb +7 -5
- data/lib/metanorma/compile/compile.rb +2 -2
- data/lib/metanorma/util/fontist_helper.rb +7 -4
- data/lib/metanorma/version.rb +1 -1
- data/metanorma.gemspec +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f949939db63522ce80839447f7a4a2c860f2b6c1a8a8bef299bb12e5a375f23c
|
|
4
|
+
data.tar.gz: cd92ed471004f16de40d4c0e02bc457a7a2492a4b0a92729a1b36d312eef2672
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f85234d7dea81dda16e4c66d1f883666bd1f9b7382ab6bd20770e75f3dc04ad940d78a54a49c2df7dfc25859f1434f5559233ce8c2eb585761397b7fcb0d22af
|
|
7
|
+
data.tar.gz: 4bddae518329cebca7cf762666c0d769243524a40c595f3ea7e94db33fad26fc3daaf26598c73a85b3ab12d13cd974a5a89ce7a1548ef679bec00156de8e6608
|
|
@@ -44,6 +44,8 @@ module Metanorma
|
|
|
44
44
|
def initialize_vars
|
|
45
45
|
@compile = Metanorma::Compile.new # feeds @manifest
|
|
46
46
|
@log = Metanorma::Utils::Log.new
|
|
47
|
+
@log.suppress_log = { severity: 4, category: [], error_ids: [],
|
|
48
|
+
locations: [] }
|
|
47
49
|
@disambig = Util::DisambigFiles.new
|
|
48
50
|
end
|
|
49
51
|
|
|
@@ -63,8 +63,9 @@ module Metanorma
|
|
|
63
63
|
doclist
|
|
64
64
|
end
|
|
65
65
|
|
|
66
|
-
BIBITEM_NOT_REPO_XPATH =
|
|
67
|
-
|
|
66
|
+
BIBITEM_NOT_REPO_XPATH = <<~XPATH.strip
|
|
67
|
+
//bibitem[not(ancestor::bibitem)][not(ancestor::bibdata)][not(./docidentifier[@type = 'repository'])]
|
|
68
|
+
XPATH
|
|
68
69
|
|
|
69
70
|
def supply_repo_ids(doc)
|
|
70
71
|
doc.xpath(ns(BIBITEM_NOT_REPO_XPATH)).each do |b|
|
|
@@ -82,10 +83,11 @@ module Metanorma
|
|
|
82
83
|
# Any erefs to that bibitem id are replaced with relative URL
|
|
83
84
|
# Preferably with anchor, and is a job to realise dynamic lookup
|
|
84
85
|
# of localities.
|
|
85
|
-
def update_direct_refs_to_docs(
|
|
86
|
+
def update_direct_refs_to_docs(xml, identifier, presxml)
|
|
86
87
|
erefs, erefs_no_anchor, anchors, erefs1 =
|
|
87
|
-
update_direct_refs_to_docs_prep(
|
|
88
|
-
|
|
88
|
+
update_direct_refs_to_docs_prep(xml, presxml)
|
|
89
|
+
x = xml.xpath(ns("//bibitem")) - xml.xpath(ns("//bibdata//bibitem"))
|
|
90
|
+
x.each do |b|
|
|
89
91
|
docid = b.at(ns("./docidentifier[@type = 'repository']")) or next
|
|
90
92
|
strip_unresolved_repo_erefs(identifier, docid, erefs1, b) or next
|
|
91
93
|
update_bibitem(b, identifier)
|
|
@@ -5,7 +5,7 @@ require "nokogiri"
|
|
|
5
5
|
require "htmlentities"
|
|
6
6
|
require "yaml"
|
|
7
7
|
require "fontist"
|
|
8
|
-
require "fontist/manifest
|
|
8
|
+
require "fontist/manifest"
|
|
9
9
|
require "metanorma-taste"
|
|
10
10
|
require_relative "writeable"
|
|
11
11
|
require_relative "validator"
|
|
@@ -248,7 +248,7 @@ module Metanorma
|
|
|
248
248
|
|
|
249
249
|
OUTPUT
|
|
250
250
|
file.close
|
|
251
|
-
compile(file.path,
|
|
251
|
+
compile(file.path, agree_to_terms: true)
|
|
252
252
|
end
|
|
253
253
|
|
|
254
254
|
def extract_log_messages(flavor)
|
|
@@ -47,11 +47,11 @@ module Metanorma
|
|
|
47
47
|
Fontist.log_level = :info
|
|
48
48
|
end
|
|
49
49
|
|
|
50
|
-
Fontist::Manifest
|
|
51
|
-
|
|
50
|
+
instance = Fontist::Manifest.from_hash(manifest)
|
|
51
|
+
instance.install(
|
|
52
52
|
confirmation: agree ? "yes" : "no",
|
|
53
53
|
no_progress: no_progress,
|
|
54
|
-
)
|
|
54
|
+
).to_hash
|
|
55
55
|
end
|
|
56
56
|
|
|
57
57
|
def license_error_log(continue)
|
|
@@ -112,9 +112,12 @@ module Metanorma
|
|
|
112
112
|
end
|
|
113
113
|
|
|
114
114
|
def self.location_manifest(processor, source_attributes)
|
|
115
|
-
Fontist::Manifest
|
|
115
|
+
instance = Fontist::Manifest.from_hash(
|
|
116
116
|
append_source_fonts(processor.fonts_manifest.dup, source_attributes),
|
|
117
|
+
locations: true
|
|
117
118
|
)
|
|
119
|
+
|
|
120
|
+
instance.to_hash unless instance.nil?
|
|
118
121
|
end
|
|
119
122
|
|
|
120
123
|
def self.append_source_fonts(manifest, source_attributes)
|
data/lib/metanorma/version.rb
CHANGED
data/metanorma.gemspec
CHANGED
|
@@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
|
|
|
26
26
|
|
|
27
27
|
spec.add_runtime_dependency "asciidoctor"
|
|
28
28
|
spec.add_runtime_dependency "concurrent-ruby"
|
|
29
|
-
spec.add_runtime_dependency "fontist", "
|
|
29
|
+
spec.add_runtime_dependency "fontist", ">= 2.0.0"
|
|
30
30
|
spec.add_runtime_dependency "htmlentities"
|
|
31
31
|
spec.add_runtime_dependency "isodoc", ">= 3.0.0"
|
|
32
32
|
spec.add_runtime_dependency "metanorma-taste", "~> 0.1.0"
|
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: 2.2.
|
|
4
|
+
version: 2.2.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: 2025-11-
|
|
11
|
+
date: 2025-11-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: asciidoctor
|
|
@@ -42,16 +42,16 @@ dependencies:
|
|
|
42
42
|
name: fontist
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
44
44
|
requirements:
|
|
45
|
-
- - "
|
|
45
|
+
- - ">="
|
|
46
46
|
- !ruby/object:Gem::Version
|
|
47
|
-
version:
|
|
47
|
+
version: 2.0.0
|
|
48
48
|
type: :runtime
|
|
49
49
|
prerelease: false
|
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
51
|
requirements:
|
|
52
|
-
- - "
|
|
52
|
+
- - ">="
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
|
-
version:
|
|
54
|
+
version: 2.0.0
|
|
55
55
|
- !ruby/object:Gem::Dependency
|
|
56
56
|
name: htmlentities
|
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|