isodoc 3.7.5 → 3.7.6
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/isodoc/function/footnotes.rb +3 -3
- data/lib/isodoc/html_function/postprocess.rb +2 -2
- data/lib/isodoc/html_function/postprocess_cover.rb +1 -1
- data/lib/isodoc/presentation_function/autonum.rb +1 -1
- data/lib/isodoc/presentation_function/ids.rb +2 -2
- data/lib/isodoc/presentation_function/refs.rb +1 -1
- data/lib/isodoc/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 53a0846d73af6d9b85e2ab844e73b7f136e7fdff0bed55e952f0538359dee5e8
|
|
4
|
+
data.tar.gz: d2b73567291b752c28d06228fe58cd1b1bb8dfea3df5acd727d8aa2db63cd541
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4a0a325e3e20a885a95cdabd6bc53a90b4537be2ec20315173ec8d6f48beb7c9af89f9cea4966db4b20edfd08a22878d704ece90495cd3a8c600b37572d81c38
|
|
7
|
+
data.tar.gz: ffb5f000b1363a094e4142091eb189bdcbba7d4dc4a3f55374b2b4eb6fecff9686af7898925842246e8c33c485c1716a7bd71b269e92fc31f9979163ef32ccc2
|
|
@@ -12,7 +12,7 @@ module IsoDoc
|
|
|
12
12
|
def get_table_ancestor_id(node)
|
|
13
13
|
table = node.ancestors("table")
|
|
14
14
|
table.empty? and table = node.ancestors("figure")
|
|
15
|
-
table.empty? and return [nil,
|
|
15
|
+
table.empty? and return [nil, Metanorma::Utils.random_uuid]
|
|
16
16
|
[table.last, table.last["id"]]
|
|
17
17
|
end
|
|
18
18
|
|
|
@@ -20,7 +20,7 @@ module IsoDoc
|
|
|
20
20
|
# do not output footnote text if we have already seen it for this table
|
|
21
21
|
|
|
22
22
|
def table_footnote_parse(node, out)
|
|
23
|
-
fn = node["reference"] ||
|
|
23
|
+
fn = node["reference"] || Metanorma::Utils.random_uuid
|
|
24
24
|
table, tid = get_table_ancestor_id(node)
|
|
25
25
|
make_table_footnote_link(out, tid + fn, node.at(ns("./fmt-fn-label")))
|
|
26
26
|
# do not output footnote text if we have already seen it for this table
|
|
@@ -49,7 +49,7 @@ module IsoDoc
|
|
|
49
49
|
|
|
50
50
|
def footnote_parse(node, out)
|
|
51
51
|
table_footnote?(node) and return table_footnote_parse(node, out)
|
|
52
|
-
fn = node["target"] # ||
|
|
52
|
+
fn = node["target"] # || Metanorma::Utils.random_uuid
|
|
53
53
|
attrs = { class: "FootnoteRef", href: "#fn:#{fn}" }
|
|
54
54
|
f = node.at(ns("./fmt-fn-label"))
|
|
55
55
|
out.a(**attrs) do |a|
|
|
@@ -118,7 +118,7 @@ module IsoDoc
|
|
|
118
118
|
|
|
119
119
|
def move_image1(img)
|
|
120
120
|
suffix = image_suffix(img)
|
|
121
|
-
uuid =
|
|
121
|
+
uuid = Metanorma::Utils.random_uuid
|
|
122
122
|
fname = "#{uuid}.#{suffix}"
|
|
123
123
|
new_full_filename = File.join(tmpimagedir, fname)
|
|
124
124
|
local_filename = image_localfile(img)
|
|
@@ -131,7 +131,7 @@ module IsoDoc
|
|
|
131
131
|
docxml.xpath("//p[@class = 'TermNum'][../#{h}]").each do |p|
|
|
132
132
|
p.name = "h#{h[1].to_i + 1}"
|
|
133
133
|
id = p["id"]
|
|
134
|
-
p["id"] = "_#{
|
|
134
|
+
p["id"] = "_#{Metanorma::Utils.random_uuid}"
|
|
135
135
|
p.wrap("<div id='#{id}'></div>")
|
|
136
136
|
end
|
|
137
137
|
end
|
|
@@ -154,7 +154,7 @@ module IsoDoc
|
|
|
154
154
|
def html_toc_entries_prep(docxml, path)
|
|
155
155
|
docxml.xpath(path.join(" | "))
|
|
156
156
|
.each_with_index.with_object({}) do |(h, i), m|
|
|
157
|
-
h["id"] ||= "_#{
|
|
157
|
+
h["id"] ||= "_#{Metanorma::Utils.random_uuid}"
|
|
158
158
|
m[h["id"]] = i
|
|
159
159
|
end
|
|
160
160
|
end
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
module IsoDoc
|
|
2
2
|
class PresentationXMLConvert < ::IsoDoc::Convert
|
|
3
3
|
def add_id_text
|
|
4
|
-
id = "_#{
|
|
4
|
+
id = "_#{Metanorma::Utils.random_uuid}"
|
|
5
5
|
@new_ids[id] = nil
|
|
6
6
|
%(id="#{id}")
|
|
7
7
|
end
|
|
8
8
|
|
|
9
9
|
def add_id(elem)
|
|
10
10
|
elem["id"] and return
|
|
11
|
-
id = "_#{
|
|
11
|
+
id = "_#{Metanorma::Utils.random_uuid}"
|
|
12
12
|
elem["id"] = id
|
|
13
13
|
@new_ids[id] = nil
|
|
14
14
|
end
|
|
@@ -195,7 +195,7 @@ module IsoDoc
|
|
|
195
195
|
ret = ident_fn(bib)
|
|
196
196
|
date_note = bibnote_extract(bib, "Unpublished-Status")
|
|
197
197
|
date_note.empty? and return ret
|
|
198
|
-
id = "_#{
|
|
198
|
+
id = "_#{Metanorma::Utils.random_uuid}"
|
|
199
199
|
@new_ids[id] = nil
|
|
200
200
|
<<~XML
|
|
201
201
|
#{ret}<fn id='#{id}' reference='#{id}'><p>#{date_note.first.content}</p></fn>
|
data/lib/isodoc/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: isodoc
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.7.
|
|
4
|
+
version: 3.7.6
|
|
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-10-
|
|
11
|
+
date: 2026-10-31 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: base64
|