mn-requirements 0.3.4 → 0.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/metanorma/default/isodoc.rb +18 -2
- data/lib/metanorma/modspec/isodoc.rb +1 -0
- data/lib/metanorma/requirements/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: 33414d3ac6b85f24c09e8dd8555f26e776b5c1ddd67aaf0a15217e0b9466e324
|
4
|
+
data.tar.gz: '098df5f8bba64b14bfef2ceead84bc5cc230f4601a33329092f382fcc9bce7d2'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7fe62355d49df8647545cdacff491d6d7aa4696f8f680ef468839930b5c12614706f80e8adf99fa4ab2f48b42a03adf4a282acdafc23d52ceabe4d2e8093fa5
|
7
|
+
data.tar.gz: 1a7babef01ab00b531200e100b8feaf99f4a817dc14e7c9e7c0c200525443d71d0a8fa0dcee17dfdced1197104067c4e254b707f1f69d04581cd5a32dd01395a
|
@@ -95,16 +95,32 @@ module Metanorma
|
|
95
95
|
end
|
96
96
|
|
97
97
|
def requirement_component_parse(node, out)
|
98
|
-
|
99
|
-
|
98
|
+
node["exclude"] == "true" and return out
|
100
99
|
ret = node.dup
|
101
100
|
if reqt_subpart?(node.name)
|
102
101
|
ret["type"] = reqt_component_type(node)
|
103
102
|
ret.name = "div"
|
104
103
|
end
|
104
|
+
descr_classif_render(ret)
|
105
105
|
out << ret
|
106
106
|
out
|
107
107
|
end
|
108
|
+
|
109
|
+
def descr_classif_render(reqt)
|
110
|
+
reqt.at(ns("./classification")) or return
|
111
|
+
ins = reqt.at(ns("./classification")).before("<dl/>").previous
|
112
|
+
descr_classif_extract(reqt, ins)
|
113
|
+
end
|
114
|
+
|
115
|
+
def descr_classif_extract(desc, ins)
|
116
|
+
dlist = desc.xpath(ns("./classification"))
|
117
|
+
dlist.each do |x|
|
118
|
+
x.at(ns("./tag")).name = "dt"
|
119
|
+
x.at(ns("./value")).name = "dd"
|
120
|
+
ins << x.children
|
121
|
+
x.remove
|
122
|
+
end
|
123
|
+
end
|
108
124
|
end
|
109
125
|
end
|
110
126
|
end
|
@@ -184,6 +184,7 @@ module Metanorma
|
|
184
184
|
|
185
185
|
def requirement_component_parse(node, out)
|
186
186
|
node["exclude"] == "true" and return out
|
187
|
+
descr_classif_render(node)
|
187
188
|
node.elements.size == 1 && node.first_element_child.name == "dl" and
|
188
189
|
return reqt_dl(node.first_element_child, out)
|
189
190
|
node.name == "component" and
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mn-requirements
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-11-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: isodoc-i18n
|