isodoc 2.7.2 → 2.7.3
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/presentation_function/bibdata.rb +13 -9
- 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: eb9c5b4a4ae20094a096ef37012c56b2f125a636c0aa426d135f1b8257cbf205
|
4
|
+
data.tar.gz: a1f5bbeed6904bd7d958ee0fdaeb4b180f0bf5405a42d556f7e787153247130d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a9aa50e9e6b759064321dbb68b46bbe9ab6d321ac73d584aad19b8ecedb109ee48119d06e72c03f7802910946d73ae72e08b24b502d3495d04e7805141de522a
|
7
|
+
data.tar.gz: fb4483cd05281ce5278d745c2ecc7f8b73139e1e47a643700c9112747ce475869c570a1555d836277cb6ed90c7d544b43eda21bc6b81a5f08b7470fb14ad8f73
|
@@ -16,15 +16,21 @@ module IsoDoc
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def extension_insert(xml, path = [])
|
19
|
-
ins = xml
|
20
|
-
xml.at(ns("//bibdata"))&.after("<metanorma-extension/>")&.next_element ||
|
21
|
-
xml.root.elements.first.before("<metanorma-extension/>").previous_element
|
19
|
+
ins = extension_insert_pt(xml)
|
22
20
|
path.each do |n|
|
23
21
|
ins = ins.at(ns("./#{n}")) || ins.add_child("<#{n}/>").first
|
24
22
|
end
|
25
23
|
ins
|
26
24
|
end
|
27
25
|
|
26
|
+
def extension_insert_pt(xml)
|
27
|
+
xml.at(ns("//metanorma-extension")) ||
|
28
|
+
xml.at(ns("//bibdata"))&.after("<metanorma-extension/>")
|
29
|
+
&.next_element ||
|
30
|
+
xml.root.elements.first.before("<metanorma-extension/>")
|
31
|
+
.previous_element
|
32
|
+
end
|
33
|
+
|
28
34
|
def preprocess_xslt_insert(docxml)
|
29
35
|
content = ""
|
30
36
|
p = passthrough_xslt and content += p
|
@@ -42,7 +48,6 @@ module IsoDoc
|
|
42
48
|
<preprocess-xslt format="#{k}">
|
43
49
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
|
44
50
|
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
|
45
|
-
<xsl:strip-space elements="*"/>
|
46
51
|
<xsl:template match="@* | node()">
|
47
52
|
<xsl:copy>
|
48
53
|
<xsl:apply-templates select="@* | node()"/>
|
@@ -142,7 +147,8 @@ module IsoDoc
|
|
142
147
|
tag_translate(x, lang, hash[x.text])
|
143
148
|
end
|
144
149
|
|
145
|
-
# does not allow %Spellout and %Ordinal in the ordinal expression
|
150
|
+
# does not allow %Spellout and %Ordinal in the ordinal expression
|
151
|
+
# to be mixed
|
146
152
|
def edition_translate(bibdata)
|
147
153
|
x = bibdata.at(ns("./edition")) or return
|
148
154
|
/^\d+$/.match?(x.text) or return
|
@@ -221,11 +227,9 @@ module IsoDoc
|
|
221
227
|
end
|
222
228
|
|
223
229
|
def trim_hash1(hash)
|
224
|
-
|
225
|
-
|
230
|
+
hash.is_a?(Hash) or return hash
|
226
231
|
hash.each_with_object({}) do |(k, v), g|
|
227
|
-
|
228
|
-
|
232
|
+
blank?(v) and next
|
229
233
|
g[k] = case v
|
230
234
|
when Hash then trim_hash1(hash[k])
|
231
235
|
when Array
|
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: 2.7.
|
4
|
+
version: 2.7.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-12-
|
11
|
+
date: 2023-12-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: html2doc
|