metanorma-ogc 1.3.7 → 1.3.8

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.
@@ -8,12 +8,16 @@ module IsoDoc
8
8
  return "recommendtest" if node["type"] == "abstracttest"
9
9
  return "recommendclass" if node["type"] == "class"
10
10
  return "recommendclass" if node["type"] == "conformanceclass"
11
+
11
12
  "recommend"
12
13
  end
13
14
 
14
15
  def recommendation_class(node)
15
- node["type"] == "recommendtest" ?
16
- "RecommendationTestTitle" : "RecommendationTitle"
16
+ if node["type"] == "recommendtest"
17
+ "RecommendationTestTitle"
18
+ else
19
+ "RecommendationTitle"
20
+ end
17
21
  end
18
22
 
19
23
  def recommendation_header(r)
@@ -27,7 +31,7 @@ module IsoDoc
27
31
  name.children.each { |n| b << n }
28
32
  b << l10n(":")
29
33
  end
30
- if title = node&.at(ns("./title"))&.remove
34
+ if title = node&.at(ns("./title"))&.remove
31
35
  b << l10n(" ") if name
32
36
  title.children.each { |n| b << n }
33
37
  end
@@ -54,7 +58,7 @@ module IsoDoc
54
58
  end
55
59
 
56
60
  def rec_subj(node)
57
- node["type"] == "recommendclass" ? "Target Type" : "Subject"
61
+ node["type"] == "recommendclass" ? "Target Type" : "Subject"
58
62
  end
59
63
 
60
64
  def recommendation_attr_keyvalue(node, key, value)
@@ -73,12 +77,14 @@ module IsoDoc
73
77
 
74
78
  def preserve_in_nested_table?(node)
75
79
  return true if %w(recommendation requirement permission table).include?(node.name)
80
+
76
81
  false
77
82
  end
78
83
 
79
84
  def requirement_component_parse(node, out)
80
85
  node.remove
81
86
  return if node["exclude"] == "true"
87
+
82
88
  node.elements.size == 1 && node.first_element_child.name == "dl" and
83
89
  return reqt_dl(node.first_element_child, out)
84
90
  b = out.add_child("<tr><td colspan='2'></td></tr>").first
@@ -110,6 +116,7 @@ module IsoDoc
110
116
  recommendation_attributes(node, b)
111
117
  node.elements.each do |n|
112
118
  next if %w(thead tbody).include?(n.name)
119
+
113
120
  requirement_component_parse(n, b)
114
121
  end
115
122
  end
@@ -145,8 +152,8 @@ module IsoDoc
145
152
  x = t.at(ns("./thead")) and x.replace(x.children)
146
153
  x = t.at(ns("./tbody")) and x.replace(x.children)
147
154
  x = t.at(ns("./tfoot")) and x.replace(x.children)
148
- if x = t.at(ns("./tr/th[@colspan = '2']")) and
149
- y = t.at(ns("./tr/td[@colspan = '2']"))
155
+ if (x = t.at(ns("./tr/th[@colspan = '2']"))) &&
156
+ (y = t.at(ns("./tr/td[@colspan = '2']")))
150
157
  requirement_table_cleanup1(x, y)
151
158
  end
152
159
  t.parent.parent.replace(t.children)
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ogc
3
- VERSION = "1.3.7".freeze
3
+ VERSION = "1.3.8".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-ogc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.7
4
+ version: 1.3.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-07-19 00:00:00.000000000 Z
11
+ date: 2021-08-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: iso-639