metanorma-ogc 1.4.0 → 1.4.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -12,6 +12,10 @@ module IsoDoc
12
12
  "recommend"
13
13
  end
14
14
 
15
+ def recommend_class?(node)
16
+ %w(recommendtest recommendclass recommend).include? node["type"]
17
+ end
18
+
15
19
  def recommendation_class(node)
16
20
  if node["type"] == "recommendtest"
17
21
  "RecommendationTestTitle"
@@ -89,7 +93,7 @@ module IsoDoc
89
93
  def rec_subj(node)
90
94
  case node["type_original"]
91
95
  when "class" then "Target Type"
92
- when "conformanceclass" then "Requirement Class"
96
+ when "conformanceclass" then "Requirements Class"
93
97
  when "verification", "abstracttest" then "Requirement"
94
98
  else "Subject"
95
99
  end
@@ -172,20 +176,21 @@ module IsoDoc
172
176
  end
173
177
 
174
178
  # table nested in table: merge label and caption into a single row
175
- def requirement_table_cleanup1(x, y)
176
- x.delete("colspan")
177
- x.delete("scope")
178
- y.delete("colspan")
179
- y.delete("scope")
180
- x.name = "td"
181
- p = x.at(ns("./p[@class = 'RecommendationTitle']")) and
179
+ def requirement_table_cleanup1(outer, inner)
180
+ outer.delete("colspan")
181
+ outer.delete("scope")
182
+ inner.delete("colspan")
183
+ inner.delete("scope")
184
+ outer.name = "td"
185
+ p = outer.at(ns("./p[@class = 'RecommendationTitle']")) and
182
186
  p.delete("class")
183
- x.parent << y.dup
184
- y.parent.remove
187
+ outer.parent << inner.dup
188
+ inner.parent.remove
185
189
  end
186
190
 
187
191
  def requirement_table_cleanup(docxml)
188
- docxml.xpath(ns("//table[@type = 'recommendclass']/tbody/tr/td/table")).each do |t|
192
+ docxml.xpath(ns("//table[@type = 'recommendclass']/tbody/tr/td/table"))
193
+ .each do |t|
189
194
  x = t.at(ns("./thead")) and x.replace(x.children)
190
195
  x = t.at(ns("./tbody")) and x.replace(x.children)
191
196
  x = t.at(ns("./tfoot")) and x.replace(x.children)
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ogc
3
- VERSION = "1.4.0".freeze
3
+ VERSION = "1.4.1".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.4.0
4
+ version: 1.4.1
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-08-16 00:00:00.000000000 Z
11
+ date: 2021-08-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: iso-639