metanorma 2.5.5 → 2.5.6.pre.alpha.2
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/Gemfile.devel +17 -7
- data/lib/metanorma/collection/document/document.rb +4 -0
- data/lib/metanorma/collection/renderer/fileparse.rb +2 -1
- data/lib/metanorma/collection/renderer/svg.rb +5 -1
- data/lib/metanorma/collection/util/util.rb +8 -1
- data/lib/metanorma/collection/xrefprocess/xrefprocess.rb +7 -1
- data/lib/metanorma/util/fontist_helper.rb +17 -0
- data/lib/metanorma/version.rb +1 -1
- data/metanorma.gemspec +2 -3
- 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: 834a924551ca15a50f160376cfcd57297d5b76a6614e2e216b23e5732895ddcf
|
|
4
|
+
data.tar.gz: 25e149845256b206fc4bd6a5d0a9aab851fcc2ed91608fad03e5c4c67540aaa6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5f8b1c155092bf4c25ae2ef76c66e87ba57ed38e7902f738267f74220a51a67dc246bef896ec85bc4d0f6c2100d78663a39c7b0e16611c36babd4a19436fa4cd
|
|
7
|
+
data.tar.gz: 4f6858efb8e6d7699a735f9d386c97d1a8c44d33516f366f6fb350c27ae3bf589b68442546da84eb868412140567426f8ac3b6edacfc41c97a85c06477c32214
|
data/Gemfile.devel
CHANGED
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
# Local development pins (eval'd by Gemfile; not committed workflow state)
|
|
2
|
-
gem "metanorma-document", github: "metanorma/metanorma-document", branch: "
|
|
3
|
-
gem "metanorma-standoc", github: "metanorma/metanorma-standoc", branch: "
|
|
4
|
-
gem "metanorma-iso", github: "metanorma/metanorma-iso", branch: "
|
|
2
|
+
gem "metanorma-document", github: "metanorma/metanorma-document", branch: "main"
|
|
3
|
+
gem "metanorma-standoc", github: "metanorma/metanorma-standoc", branch: "main"
|
|
4
|
+
gem "metanorma-iso", github: "metanorma/metanorma-iso", branch: "main"
|
|
5
5
|
gem "isodoc", github: "metanorma/isodoc", branch: "main"
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
# released metanorma-iho 1.4.0 still carries lib/relaton/render/general.rb,
|
|
7
|
+
# which shadows relaton-render's iso690 autoload by load-path name; iho
|
|
8
|
+
# main relocated its render files
|
|
9
|
+
gem "metanorma-iho", github: "metanorma/metanorma-iho", branch: "main"
|
|
10
|
+
gem "pubid", "~> 2.0.0.pre.alpha"
|
|
11
|
+
# The 1.9.356/0.5.13x pin pair worked around the leptris#1733 to_xml
|
|
12
|
+
# regression; retired — the fleet line is leptris 1.9.376 + moxml 0.5.149
|
|
13
|
+
# (all suites green), and the exact pin now deadlocks against vectory's
|
|
14
|
+
# leptris >= 1.9.361.1 floor.
|
|
15
|
+
gem "leptris", "~> 1.9"
|
|
16
|
+
gem "relaton-cli", "~> 3.0.0.pre.alpha"
|
|
8
17
|
gem "glossarist", "~> 2.13"
|
|
9
|
-
gem "lutaml-model", "~> 0.8.
|
|
10
|
-
gem "metanorma-plugin-glossarist", "0.
|
|
18
|
+
gem "lutaml-model", "~> 0.8.107"
|
|
19
|
+
gem "metanorma-plugin-glossarist", "~> 0.5"
|
|
20
|
+
gem "moxml", "~> 0.5"
|
|
@@ -107,6 +107,10 @@ module Metanorma
|
|
|
107
107
|
end
|
|
108
108
|
# Relaton doesn't understand Pres XML tags
|
|
109
109
|
b.xpath("//xmlns:fmt-identifier").each(&:remove)
|
|
110
|
+
# Relaton models a single <edition>; flavors emit a language-neutral
|
|
111
|
+
# edition plus localized variants (<edition language="en">first
|
|
112
|
+
# edition</edition>). Keep the language-neutral one for bibdata.
|
|
113
|
+
b.xpath("//xmlns:edition[@language != '']").each(&:remove)
|
|
110
114
|
r.from_xml(b.to_xml)
|
|
111
115
|
end
|
|
112
116
|
|
|
@@ -47,7 +47,8 @@ module Metanorma
|
|
|
47
47
|
::Metanorma::Collection::Util::hide_refs(xml)
|
|
48
48
|
# post: references containers with only hidden bibitems flagged hidden.
|
|
49
49
|
sso and eref2link(xml, sso)
|
|
50
|
-
|
|
50
|
+
# svgmap_resolve hands back the tree Vectory rebuilt; keep it.
|
|
51
|
+
xml = svgmap_resolve(xml, docid, sso) unless @nested || @reinflate
|
|
51
52
|
xml.to_xml
|
|
52
53
|
end
|
|
53
54
|
|
|
@@ -36,11 +36,15 @@ module Metanorma
|
|
|
36
36
|
# Stage 3: Process with Vectory
|
|
37
37
|
# Pass document suffix to Vectory as id_suffix for proper SVG ID disambiguation.
|
|
38
38
|
# Vectory handles both id_suffix (document-level) and index suffix internally.
|
|
39
|
+
# It parses its own copy and returns the processed document, so the
|
|
40
|
+
# result must be adopted here or none of its work reaches the tree.
|
|
39
41
|
doc_suffix = @files.get(docid, :document_suffix)
|
|
40
|
-
Vectory::SvgMapping.new(docxml, "", id_suffix: doc_suffix).call
|
|
42
|
+
mapped = Vectory::SvgMapping.new(docxml, "", id_suffix: doc_suffix).call
|
|
43
|
+
docxml = Nokogiri::XML(mapped.to_xml, &:huge)
|
|
41
44
|
|
|
42
45
|
# Stage 4: Extract processed SVG content
|
|
43
46
|
extract_svgmap_content(docxml, isodoc)
|
|
47
|
+
docxml
|
|
44
48
|
end
|
|
45
49
|
|
|
46
50
|
# Prepares document and context for svgmap resolution
|
|
@@ -123,9 +123,16 @@ module Metanorma
|
|
|
123
123
|
# not processed already by add_suffix_to_attrs
|
|
124
124
|
def url_in_css_styles(doc, ids, document_suffix)
|
|
125
125
|
update_ids_css(doc.root, ids, document_suffix)
|
|
126
|
-
|
|
126
|
+
# svgmap SVGs are owned by Vectory::SvgMapping, which applies the
|
|
127
|
+
# same suffix itself; suffixing them here would double it. Only
|
|
128
|
+
# standalone SVGs need the suffix from this pass.
|
|
129
|
+
doc.xpath("//i:svg[not(ancestor::*[local-name()='svgmap'])]",
|
|
130
|
+
"i" => SVG_NS).each do |s|
|
|
127
131
|
svg = Vectory::SvgDocument.new(s.to_xml)
|
|
128
132
|
svg.suffix_ids(document_suffix)
|
|
133
|
+
# suffix_ids mutates SvgDocument's own parse; write the
|
|
134
|
+
# suffixed SVG back into the tree, or the suffix is lost
|
|
135
|
+
s.replace(svg.content)
|
|
129
136
|
end
|
|
130
137
|
end
|
|
131
138
|
|
|
@@ -210,7 +210,13 @@ module Metanorma
|
|
|
210
210
|
# external_bibitems[x.sub(/^#{key}_/, "")]
|
|
211
211
|
end.each do |x|
|
|
212
212
|
ins << if b = internal_bibitems[x.sub(/^#{key}_/, "")]
|
|
213
|
-
b.dup.tap
|
|
213
|
+
b.dup.tap do |m|
|
|
214
|
+
m["id"] = x
|
|
215
|
+
# The anchor belongs to the original bibitem: the
|
|
216
|
+
# hidden copy is referenced by its new id, and a
|
|
217
|
+
# duplicated anchor fails id-uniqueness validation.
|
|
218
|
+
m.delete("anchor")
|
|
219
|
+
end
|
|
214
220
|
else new_indirect_bibitem(x, key)
|
|
215
221
|
end
|
|
216
222
|
end
|
|
@@ -36,10 +36,27 @@ module Metanorma
|
|
|
36
36
|
Util.log("[fontist] '#{e.font}' font is not supported. " \
|
|
37
37
|
"Please report this issue at " \
|
|
38
38
|
"https://github.com/metanorma/metanorma/issues", log_level)
|
|
39
|
+
rescue *size_limit_errors => e
|
|
40
|
+
log_level = continue ? :warning : :fatal
|
|
41
|
+
Util.log("[fontist] #{e.message}. " \
|
|
42
|
+
"Please report this issue at " \
|
|
43
|
+
"https://github.com/metanorma/metanorma/issues", log_level)
|
|
39
44
|
rescue Fontist::Errors::FormulaIndexNotFoundError
|
|
40
45
|
fontist_update_repo(manifest, agree, continue, no_progress)
|
|
41
46
|
end
|
|
42
47
|
|
|
48
|
+
# fontist 3 rejects formulas above its size limit (Fontist::Errors::
|
|
49
|
+
# SizeLimitError); fontist 2.x, which metanorma still supports, does
|
|
50
|
+
# not define the class, so rescue on an empty list rather than raise
|
|
51
|
+
# the dependency floor.
|
|
52
|
+
def size_limit_errors
|
|
53
|
+
if defined?(Fontist::Errors::SizeLimitError)
|
|
54
|
+
[Fontist::Errors::SizeLimitError]
|
|
55
|
+
else
|
|
56
|
+
[]
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
|
|
43
60
|
def fontist_install(manifest, agree, no_progress)
|
|
44
61
|
if agree then no_license_log
|
|
45
62
|
else
|
data/lib/metanorma/version.rb
CHANGED
data/metanorma.gemspec
CHANGED
|
@@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
|
|
|
31
31
|
spec.add_runtime_dependency "isodoc", ">= 3.5.0"
|
|
32
32
|
spec.add_runtime_dependency "marcel"
|
|
33
33
|
spec.add_runtime_dependency "metanorma-core"
|
|
34
|
-
spec.add_runtime_dependency "metanorma-standoc"
|
|
34
|
+
spec.add_runtime_dependency "metanorma-standoc", ">= 3.5.0"
|
|
35
35
|
spec.add_runtime_dependency "mn2pdf", "~> 2"
|
|
36
36
|
spec.add_runtime_dependency "nokogiri"
|
|
37
37
|
spec.add_development_dependency "canon" #, "= 0.2.3"
|
|
@@ -39,5 +39,4 @@ Gem::Specification.new do |spec|
|
|
|
39
39
|
spec.add_development_dependency "metanorma-iso"
|
|
40
40
|
|
|
41
41
|
# relaton-cli is required by Metanorma::Collection
|
|
42
|
-
spec.add_dependency "relaton-cli"
|
|
43
|
-
end
|
|
42
|
+
spec.add_dependency "relaton-cli", ">= 3.0.0.pre.alpha"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: 2.5.
|
|
4
|
+
version: 2.5.6.pre.alpha.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-10-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: asciidoctor
|
|
@@ -114,14 +114,14 @@ dependencies:
|
|
|
114
114
|
requirements:
|
|
115
115
|
- - ">="
|
|
116
116
|
- !ruby/object:Gem::Version
|
|
117
|
-
version:
|
|
117
|
+
version: 3.5.0
|
|
118
118
|
type: :runtime
|
|
119
119
|
prerelease: false
|
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
|
121
121
|
requirements:
|
|
122
122
|
- - ">="
|
|
123
123
|
- !ruby/object:Gem::Version
|
|
124
|
-
version:
|
|
124
|
+
version: 3.5.0
|
|
125
125
|
- !ruby/object:Gem::Dependency
|
|
126
126
|
name: mn2pdf
|
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -198,14 +198,14 @@ dependencies:
|
|
|
198
198
|
requirements:
|
|
199
199
|
- - ">="
|
|
200
200
|
- !ruby/object:Gem::Version
|
|
201
|
-
version:
|
|
201
|
+
version: 3.0.0.pre.alpha
|
|
202
202
|
type: :runtime
|
|
203
203
|
prerelease: false
|
|
204
204
|
version_requirements: !ruby/object:Gem::Requirement
|
|
205
205
|
requirements:
|
|
206
206
|
- - ">="
|
|
207
207
|
- !ruby/object:Gem::Version
|
|
208
|
-
version:
|
|
208
|
+
version: 3.0.0.pre.alpha
|
|
209
209
|
description: Library to process any Metanorma standard.
|
|
210
210
|
email:
|
|
211
211
|
- open.source@ribose.com
|