isodoc 2.9.2 → 2.9.4
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/convert.rb +7 -4
- data/lib/isodoc/function/blocks_example_note.rb +4 -4
- data/lib/isodoc/function/inline.rb +5 -1
- data/lib/isodoc/function/references.rb +13 -3
- data/lib/isodoc/function/utils.rb +1 -1
- data/lib/isodoc/html_function/html.rb +7 -5
- data/lib/isodoc/html_function/postprocess.rb +3 -2
- data/lib/isodoc/presentation_function/bibdata.rb +0 -1
- data/lib/isodoc/presentation_function/erefs.rb +16 -14
- data/lib/isodoc/presentation_function/refs.rb +4 -4
- data/lib/isodoc/presentation_function/terms.rb +1 -1
- data/lib/isodoc/presentation_function/xrefs.rb +14 -8
- data/lib/isodoc/presentation_xml_convert.rb +7 -5
- data/lib/isodoc/version.rb +1 -1
- data/lib/isodoc/word_function/postprocess_cover.rb +1 -2
- data/lib/isodoc/xref/xref_sect_gen.rb +4 -2
- data/lib/isodoc/xref.rb +3 -1
- data/lib/isodoc-yaml/i18n-ar.yaml +1 -0
- data/lib/isodoc-yaml/i18n-de.yaml +1 -0
- data/lib/isodoc-yaml/i18n-en.yaml +1 -0
- data/lib/isodoc-yaml/i18n-es.yaml +1 -0
- data/lib/isodoc-yaml/i18n-fr.yaml +1 -0
- data/lib/isodoc-yaml/i18n-ja.yaml +1 -0
- data/lib/isodoc-yaml/i18n-ru.yaml +1 -0
- data/lib/isodoc-yaml/i18n-zh-Hans.yaml +1 -0
- 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: fa1b06e38f973ba312a0f2d90d306c7ffb34e377f2fcc4a59c42775ba9f2a927
|
4
|
+
data.tar.gz: b74dcbe6b71b90da2ec4f205754bb08028d5bd1d45f085f7e35d6c3c47dc55cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9cbe711521cc25e29f1879fa47ca42347a5ecfc0f94526166a4acb73f5787d5a5d577d68e3fe756cedce0c862b4aebfb54022fea51f296cbbeeff173e2ad5521
|
7
|
+
data.tar.gz: a07f6c1bdd5457be3cad8fececa4974de6bc95a952c73e31b718e22606a6d4c6807293729a784d55655a4419e10486c7de171dd1630ceb2f275605b263955e5d
|
data/lib/isodoc/convert.rb
CHANGED
@@ -10,7 +10,7 @@ require "mn-requirements"
|
|
10
10
|
module IsoDoc
|
11
11
|
class Convert < ::IsoDoc::Common
|
12
12
|
attr_accessor :options, :i18n, :meta, :xrefs, :reqt_models,
|
13
|
-
:requirements_processor, :doctype
|
13
|
+
:requirements_processor, :doctype, :bibrender
|
14
14
|
|
15
15
|
# htmlstylesheet: Generic stylesheet for HTML
|
16
16
|
# htmlstylesheet_override: Override stylesheet for HTML
|
@@ -86,7 +86,7 @@ module IsoDoc
|
|
86
86
|
|
87
87
|
def bibrenderer(options = {})
|
88
88
|
::Relaton::Render::IsoDoc::General.new(options.merge(language: @lang,
|
89
|
-
|
89
|
+
i18nhash: @i18n.get))
|
90
90
|
end
|
91
91
|
|
92
92
|
def convert1(docxml, filename, dir)
|
@@ -108,7 +108,8 @@ module IsoDoc
|
|
108
108
|
docxml.root.default_namespace = ""
|
109
109
|
convert_i18n_init(docxml)
|
110
110
|
metadata_init(@lang, @script, @locale, @i18n)
|
111
|
-
xref_init(@lang, @script, self, @i18n,
|
111
|
+
xref_init(@lang, @script, self, @i18n,
|
112
|
+
{ locale: @locale, bibrender: @bibrender })
|
112
113
|
docxml = preprocess_xslt(docxml)
|
113
114
|
toc_init(docxml)
|
114
115
|
[docxml, filename, dir]
|
@@ -121,7 +122,8 @@ module IsoDoc
|
|
121
122
|
end
|
122
123
|
docxml
|
123
124
|
rescue ::Error => e
|
124
|
-
require "debug"
|
125
|
+
require "debug"
|
126
|
+
binding.b
|
125
127
|
end
|
126
128
|
|
127
129
|
def extract_preprocess_xslt(docxml)
|
@@ -136,6 +138,7 @@ module IsoDoc
|
|
136
138
|
def convert_i18n_init(docxml)
|
137
139
|
convert_i18n_init1(docxml)
|
138
140
|
i18n_init(@lang, @script, @locale)
|
141
|
+
@bibrender ||= bibrenderer
|
139
142
|
@reqt_models = requirements_processor
|
140
143
|
.new({ default: "default", lang: @lang, script: @script,
|
141
144
|
locale: @locale, labels: @i18n.get,
|
@@ -58,7 +58,7 @@ module IsoDoc
|
|
58
58
|
end
|
59
59
|
|
60
60
|
def note_p_parse(node, div)
|
61
|
-
name = node
|
61
|
+
name = node.at(ns("./name"))&.remove
|
62
62
|
div.p do |p|
|
63
63
|
name and p.span class: "note_label" do |s|
|
64
64
|
name.children.each { |n| parse(n, s) }
|
@@ -71,10 +71,9 @@ module IsoDoc
|
|
71
71
|
end
|
72
72
|
|
73
73
|
def note_parse1(node, div)
|
74
|
-
name = node.at(ns("./name"))
|
75
|
-
name and div.p do |p|
|
74
|
+
name = node.at(ns("./name")) and div.p do |p|
|
76
75
|
p.span class: "note_label" do |s|
|
77
|
-
name.children.each { |n| parse(n, s) }
|
76
|
+
name.remove.children.each { |n| parse(n, s) }
|
78
77
|
s << note_delim
|
79
78
|
end
|
80
79
|
insert_tab(p, 1)
|
@@ -84,6 +83,7 @@ module IsoDoc
|
|
84
83
|
|
85
84
|
def keep_style(node)
|
86
85
|
ret = ""
|
86
|
+
node["style"] and ret += "#{node['style']};"
|
87
87
|
node["keep-with-next"] == "true" and
|
88
88
|
ret += "page-break-after: avoid;"
|
89
89
|
node["keep-lines-together"] == "true" and
|
@@ -118,10 +118,14 @@ module IsoDoc
|
|
118
118
|
width: node["width"] || "auto",
|
119
119
|
title: node["title"],
|
120
120
|
alt: node["alt"] }
|
121
|
-
|
121
|
+
image_body_parse(node, attrs, out)
|
122
122
|
image_title_parse(out, caption)
|
123
123
|
end
|
124
124
|
|
125
|
+
def image_body_parse(_node, attrs, out)
|
126
|
+
out.img **attr_code(attrs)
|
127
|
+
end
|
128
|
+
|
125
129
|
def smallcap_parse(node, xml)
|
126
130
|
xml.span style: "font-variant:small-caps;" do |s|
|
127
131
|
node.children.each { |n| parse(n, s) }
|
@@ -32,8 +32,18 @@ module IsoDoc
|
|
32
32
|
|
33
33
|
def pref_ref_code(bib)
|
34
34
|
bib["suppress_identifier"] == "true" and return nil
|
35
|
-
@
|
36
|
-
|
35
|
+
ret = bib.xpath(ns("./docidentifier[@scope = 'biblio-tag']"))
|
36
|
+
ret.empty? or return ret.map(&:text)
|
37
|
+
ret = pref_ref_code_parse(bib) or return nil
|
38
|
+
ins = bib.at(ns("./docidentifier[last()]"))
|
39
|
+
ret.reverse.each do |r|
|
40
|
+
ins.next = "<docidentifier scope='biblio-tag'>#{docid_l10n(r)}</docidentifier>"
|
41
|
+
end
|
42
|
+
ret
|
43
|
+
end
|
44
|
+
|
45
|
+
def pref_ref_code_parse(bib)
|
46
|
+
data, = @bibrender.parse(bib)
|
37
47
|
ret = data[:authoritative_identifier] or return nil
|
38
48
|
ret.empty? and return nil
|
39
49
|
ret
|
@@ -142,7 +152,7 @@ module IsoDoc
|
|
142
152
|
"//bibliography/references[@normative = 'true'] | " \
|
143
153
|
"//bibliography/clause[.//references[@normative = 'true']] | " \
|
144
154
|
"//sections/references[@normative = 'true'] | " \
|
145
|
-
"//sections/clause[.//references[@normative = 'true']]"
|
155
|
+
"//sections/clause[not(@type)][.//references[@normative = 'true']]"
|
146
156
|
end
|
147
157
|
|
148
158
|
def norm_ref(node, out)
|
@@ -204,6 +204,7 @@ module IsoDoc
|
|
204
204
|
case img["src"]
|
205
205
|
when /^data:/ then save_dataimage(img["src"], false)
|
206
206
|
when %r{^([A-Z]:)?/} then img["src"]
|
207
|
+
when nil then nil
|
207
208
|
else File.join(@localdir, img["src"])
|
208
209
|
end
|
209
210
|
end
|
@@ -213,7 +214,6 @@ module IsoDoc
|
|
213
214
|
note table figure sourcecode).freeze
|
214
215
|
|
215
216
|
def labelled_ancestor(elem)
|
216
|
-
#require "debug"; binding.b
|
217
217
|
#!elem.path.gsub(/\[\d+\]/, "").split(%r{/})[1..-1]
|
218
218
|
!elem.ancestors.map(&:name)
|
219
219
|
.intersection(LABELLED_ANCESTOR_ELEMENTS).empty?
|
@@ -16,7 +16,6 @@ module IsoDoc
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def preprocess_xslt(docxml)
|
19
|
-
|
20
19
|
super
|
21
20
|
end
|
22
21
|
|
@@ -103,12 +102,15 @@ module IsoDoc
|
|
103
102
|
ret
|
104
103
|
end
|
105
104
|
|
106
|
-
def
|
105
|
+
def image_body_parse(node, attrs, out)
|
107
106
|
if svg = node.at("./m:svg", "m" => "http://www.w3.org/2000/svg")
|
108
|
-
|
109
|
-
|
107
|
+
%i(height width).each do |k|
|
108
|
+
v = attrs[k] and v != "auto" and !v.empty? and
|
109
|
+
svg[k.to_s] = v
|
110
|
+
end
|
111
|
+
out.parent.add_child(svg)
|
112
|
+
else super
|
110
113
|
end
|
111
|
-
super
|
112
114
|
end
|
113
115
|
end
|
114
116
|
end
|
@@ -66,8 +66,9 @@ module IsoDoc
|
|
66
66
|
def resize_images(docxml)
|
67
67
|
docxml.xpath("//*[local-name() = 'img' or local-name() = 'svg']")
|
68
68
|
.each do |i|
|
69
|
+
loc = image_localfile(i) or next
|
69
70
|
i["width"], i["height"] = Vectory::ImageResize.new
|
70
|
-
.call(i,
|
71
|
+
.call(i, loc, @maxheight, @maxwidth)
|
71
72
|
end
|
72
73
|
docxml
|
73
74
|
end
|
@@ -76,7 +77,7 @@ module IsoDoc
|
|
76
77
|
def move_images(docxml)
|
77
78
|
FileUtils.rm_rf tmpimagedir
|
78
79
|
FileUtils.mkdir tmpimagedir
|
79
|
-
docxml.xpath("//*[local-name() = 'img']").each do |i|
|
80
|
+
docxml.xpath("//*[local-name() = 'img'][@src]").each do |i|
|
80
81
|
/^data:/.match? i["src"] and next
|
81
82
|
@datauriimage ? datauri(i) : move_image1(i)
|
82
83
|
end
|
@@ -2,6 +2,13 @@ require "metanorma-utils"
|
|
2
2
|
|
3
3
|
module IsoDoc
|
4
4
|
class PresentationXMLConvert < ::IsoDoc::Convert
|
5
|
+
def citeas(xmldoc)
|
6
|
+
xmldoc.xpath(ns("//eref | //origin | //quote/source")).each do |e|
|
7
|
+
e["bibitemid"] && e["citeas"] or next
|
8
|
+
a = @xrefs.anchor(e["bibitemid"], :xref, false) and e["citeas"] = a
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
5
12
|
def expand_citeas(text)
|
6
13
|
text.nil? and return text
|
7
14
|
HTMLEntities.new.decode(text.gsub("&#x", "&#"))
|
@@ -40,7 +47,6 @@ module IsoDoc
|
|
40
47
|
(refs.size > 1 &&
|
41
48
|
refs.all? { |r| r.name == "localityStack" } &&
|
42
49
|
refs.all? { |r| r.xpath(ns("./locality")).size == 1 }) or return false
|
43
|
-
|
44
50
|
first = refs.first.at(ns("./locality/@type")).text
|
45
51
|
refs.all? do |r|
|
46
52
|
r.at(ns("./locality/@type")).text == first
|
@@ -97,8 +103,7 @@ module IsoDoc
|
|
97
103
|
added = eref_locality_stack(r, i, target, node)
|
98
104
|
added.empty? and next
|
99
105
|
added.each { |a| m << a }
|
100
|
-
|
101
|
-
|
106
|
+
i == refs.size - 1 and next
|
102
107
|
m << eref_locality_delimiter(r)
|
103
108
|
end
|
104
109
|
ret.empty? ? ret : [", "] + ret
|
@@ -156,8 +161,7 @@ module IsoDoc
|
|
156
161
|
|
157
162
|
# def eref_localities1(target, type, from, upto, node, lang = "en")
|
158
163
|
def eref_localities1(opt)
|
159
|
-
|
160
|
-
|
164
|
+
opt[:type] == "anchor" and return nil
|
161
165
|
opt[:lang] == "zh" and
|
162
166
|
# return l10n(eref_localities1_zh(target, type, from, upto, node))
|
163
167
|
return l10n(eref_localities1_zh(opt))
|
@@ -168,8 +172,7 @@ module IsoDoc
|
|
168
172
|
end
|
169
173
|
|
170
174
|
def eref_locality_populate(type, node, number)
|
171
|
-
|
172
|
-
|
175
|
+
node["droploc"] == "true" and return ""
|
173
176
|
loc = type.sub(/^locality:/, "")
|
174
177
|
ret = @i18n.locality[loc] || loc
|
175
178
|
number == "pl" and ret = @i18n.inflect(ret, number: "pl")
|
@@ -206,9 +209,8 @@ module IsoDoc
|
|
206
209
|
end
|
207
210
|
|
208
211
|
def suffix_url(url)
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
+
url.nil? || %r{^https?://|^#}.match?(url) and return url
|
213
|
+
File.extname(url).empty? or return url
|
212
214
|
url.sub(/#{File.extname(url)}$/, ".html")
|
213
215
|
end
|
214
216
|
|
@@ -221,10 +223,10 @@ module IsoDoc
|
|
221
223
|
end
|
222
224
|
|
223
225
|
def eref_url(id)
|
224
|
-
@
|
225
|
-
b = @
|
226
|
-
url =
|
227
|
-
|
226
|
+
@bibitem_lookup.nil? and return nil
|
227
|
+
b = @bibitem_lookup[id] or return nil
|
228
|
+
url = b.at(ns("./uri[@type = 'citation'][@language = '#{@lang}']")) ||
|
229
|
+
b.at(ns("./uri[@type = 'citation']")) and return url.text
|
228
230
|
b["hidden"] == "true" and return b.at(ns("./uri"))&.text
|
229
231
|
"##{id}"
|
230
232
|
end
|
@@ -37,8 +37,8 @@ module IsoDoc
|
|
37
37
|
prep_for_rendering(b)
|
38
38
|
m << to_xml(b)
|
39
39
|
end.join
|
40
|
-
@
|
41
|
-
|
40
|
+
@bibrender.render_all("<references>#{refs}</references>",
|
41
|
+
type: citestyle)
|
42
42
|
end
|
43
43
|
|
44
44
|
def prep_for_rendering(bib)
|
@@ -49,10 +49,10 @@ module IsoDoc
|
|
49
49
|
|
50
50
|
def bibitem(xml, renderings)
|
51
51
|
@xrefs.klass.implicit_reference(xml) and xml["hidden"] = "true"
|
52
|
-
|
52
|
+
bibrender_item(xml, renderings)
|
53
53
|
end
|
54
54
|
|
55
|
-
def
|
55
|
+
def bibrender_item(xml, renderings)
|
56
56
|
if (f = xml.at(ns("./formattedref"))) && xml.at(ns("./title")).nil?
|
57
57
|
bibrender_formattedref(f, xml)
|
58
58
|
else bibrender_relaton(xml, renderings)
|
@@ -164,7 +164,7 @@ module IsoDoc
|
|
164
164
|
|
165
165
|
def termsource_add_modification_text(mod)
|
166
166
|
mod or return
|
167
|
-
mod.text.strip.empty? or mod.previous = " &#
|
167
|
+
mod.text.strip.empty? or mod.previous = " — "
|
168
168
|
mod.elements.size == 1 and
|
169
169
|
mod.elements[0].replace(mod.elements[0].children)
|
170
170
|
mod.replace(mod.children)
|
@@ -4,7 +4,8 @@ module IsoDoc
|
|
4
4
|
prefix_container?(container, node) or return linkend
|
5
5
|
container_container = @xrefs.anchor(container, :container, false)
|
6
6
|
container_label =
|
7
|
-
prefix_container(container_container,
|
7
|
+
prefix_container(container_container,
|
8
|
+
anchor_xref(node, container, container: true),
|
8
9
|
node, target)
|
9
10
|
l10n(@i18n.nested_xref.sub("%1", container_label)
|
10
11
|
.sub("%2", linkend))
|
@@ -40,8 +41,8 @@ module IsoDoc
|
|
40
41
|
capitalise_xref(node, linkend, anchor_value(node["target"]))
|
41
42
|
end
|
42
43
|
|
43
|
-
def anchor_xref(node, target)
|
44
|
-
x =
|
44
|
+
def anchor_xref(node, target, container: false)
|
45
|
+
x = anchor_xref_short(node, target, container)
|
45
46
|
t = @xrefs.anchor(target, :title)
|
46
47
|
ret = case node["style"]
|
47
48
|
when "basic" then t
|
@@ -52,9 +53,15 @@ module IsoDoc
|
|
52
53
|
ret || x
|
53
54
|
end
|
54
55
|
|
56
|
+
def anchor_xref_short(node, target, container)
|
57
|
+
if (l = node["label"]) && !container
|
58
|
+
@i18n.l10n("#{l} #{anchor_value(target)}")
|
59
|
+
else @xrefs.anchor(target, :xref)
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
55
63
|
def anchor_xref_full(num, title)
|
56
64
|
(!title.nil? && !title.empty?) or return nil
|
57
|
-
|
58
65
|
l10n("#{num}, #{title}")
|
59
66
|
end
|
60
67
|
|
@@ -77,7 +84,8 @@ module IsoDoc
|
|
77
84
|
capitalise_xref(node, linkend, anchor_value(node["target"]))
|
78
85
|
end
|
79
86
|
|
80
|
-
# Note % to entry and Note % to entry:
|
87
|
+
# Note % to entry and Note % to entry:
|
88
|
+
# cannot conflate as Note % to entry 1 and 2
|
81
89
|
# So Notes 1 and 3, but Note 1 to entry and Note 3 to entry
|
82
90
|
def combine_conflated_xref_locations(locs)
|
83
91
|
out = if locs.any? { |l| l[:elem]&.include?("%") }
|
@@ -123,8 +131,7 @@ module IsoDoc
|
|
123
131
|
end
|
124
132
|
|
125
133
|
def combine_conn(list)
|
126
|
-
|
127
|
-
|
134
|
+
list.size == 1 and list.first[:label]
|
128
135
|
if list[1..-1].all? { |l| l[:conn] == "and" }
|
129
136
|
@i18n.boolean_conj(list.map { |l| loc2xref(l) }, "and")
|
130
137
|
elsif list[1..-1].all? { |l| l[:conn] == "or" }
|
@@ -154,7 +161,6 @@ module IsoDoc
|
|
154
161
|
linktext[0, 1].match?(/\p{Upper}/) and return linkend
|
155
162
|
node["case"] and
|
156
163
|
return Common::case_with_markup(linkend, node["case"], @script)
|
157
|
-
|
158
164
|
capitalise_xref1(node, linkend)
|
159
165
|
end
|
160
166
|
|
@@ -19,8 +19,8 @@ module IsoDoc
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def convert1(docxml, _filename, _dir)
|
22
|
+
docid_prefixes(docxml) # feeds @xrefs.parse citation processing
|
22
23
|
@xrefs.parse docxml
|
23
|
-
bibitem_lookup(docxml)
|
24
24
|
info docxml, nil
|
25
25
|
conversions(docxml)
|
26
26
|
docxml.root["type"] = "presentation"
|
@@ -28,7 +28,7 @@ module IsoDoc
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def bibitem_lookup(docxml)
|
31
|
-
@
|
31
|
+
@bibitem_lookup ||= docxml.xpath(ns("//references/bibitem"))
|
32
32
|
.each_with_object({}) do |b, m|
|
33
33
|
m[b["id"]] = b
|
34
34
|
end
|
@@ -82,10 +82,12 @@ module IsoDoc
|
|
82
82
|
end
|
83
83
|
|
84
84
|
def inline(docxml)
|
85
|
+
bibitem_lookup(docxml) # feeds citeas
|
86
|
+
citeas docxml # feeds xref, eref, origin, quotesource
|
85
87
|
xref docxml
|
86
|
-
eref docxml # feeds
|
87
|
-
origin docxml # feeds
|
88
|
-
quotesource docxml # feeds
|
88
|
+
eref docxml # feeds eref2link
|
89
|
+
origin docxml # feeds eref2link
|
90
|
+
quotesource docxml # feeds eref2link
|
89
91
|
eref2link docxml
|
90
92
|
mathml docxml
|
91
93
|
ruby docxml
|
data/lib/isodoc/version.rb
CHANGED
@@ -88,8 +88,7 @@ module IsoDoc
|
|
88
88
|
end
|
89
89
|
|
90
90
|
def generate_header(filename, _dir)
|
91
|
-
return nil
|
92
|
-
|
91
|
+
@header or return nil
|
93
92
|
template = IsoDoc::Common.liquid(File.read(@header, encoding: "UTF-8"))
|
94
93
|
meta = @meta.get.merge(@labels ? { labels: @labels } : {})
|
95
94
|
.merge(@meta.labels ? { labels: @meta.labels } : {})
|
@@ -42,7 +42,9 @@ module IsoDoc
|
|
42
42
|
annex_anchor_names(xml)
|
43
43
|
back_clauses_anchor_names(xml)
|
44
44
|
end
|
45
|
-
|
45
|
+
if @klass.bibrender && (@parse_settings.empty? || @parse_settings[:refs])
|
46
|
+
references(xml)
|
47
|
+
end
|
46
48
|
end
|
47
49
|
|
48
50
|
def annex_anchor_names(xml)
|
@@ -98,7 +100,7 @@ module IsoDoc
|
|
98
100
|
|
99
101
|
# preempt clause notes with all other types of note (ISO default)
|
100
102
|
def asset_anchor_names(doc)
|
101
|
-
@parse_settings.empty? or return
|
103
|
+
(@parse_settings.empty? || @parse_settings[:assets]) or return
|
102
104
|
middle_section_asset_names(doc)
|
103
105
|
termnote_anchor_names(doc)
|
104
106
|
termexample_anchor_names(doc)
|
data/lib/isodoc/xref.rb
CHANGED
@@ -15,6 +15,7 @@ module IsoDoc
|
|
15
15
|
|
16
16
|
attr_reader :klass
|
17
17
|
|
18
|
+
# Note: if bibrender is no passed in, do not parse references
|
18
19
|
def initialize(lang, script, klass, i18n, options = {})
|
19
20
|
@anchors = {}
|
20
21
|
@lang = lang
|
@@ -24,6 +25,7 @@ module IsoDoc
|
|
24
25
|
@i18n = i18n
|
25
26
|
@labels = @i18n.get
|
26
27
|
@klass.i18n = @i18n
|
28
|
+
@klass.bibrender ||= options[:bibrender]
|
27
29
|
@locale = options[:locale]
|
28
30
|
@reqt_models = @klass.requirements_processor
|
29
31
|
.new({
|
@@ -39,7 +41,7 @@ module IsoDoc
|
|
39
41
|
end
|
40
42
|
|
41
43
|
# parse only the elements set, if any are set
|
42
|
-
# defined are: clause: true, refs: true
|
44
|
+
# defined are: clause: true, refs: true, assets: true
|
43
45
|
def parse_inclusions(options)
|
44
46
|
@parse_settings.merge!(options)
|
45
47
|
self
|
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: 2.9.
|
4
|
+
version: 2.9.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-03-
|
11
|
+
date: 2024-03-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: html2doc
|