mn-requirements 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 333a04af44a0a5f5f1d5eab78dcd03e017ef31496a149040d516083d1b59d00f
4
- data.tar.gz: 2cc3b4028414b0a623e8b81e49b5f89845c09d856a08c9b71fcc60348f3241fc
3
+ metadata.gz: 02c327aaa54455f58c577358ea68b452942aacad9ea3f2040d112c51514a7598
4
+ data.tar.gz: ebb500af5264c2cdc45f378f4ffe66fef574e699e49c23a5b30b5a1a7fc7221e
5
5
  SHA512:
6
- metadata.gz: 1bed26229a755a97e10394112feeee667273fa0b924033300b85b411f341d07912c28946ada743401784b60764c5d1b6a57836ae316b24d1093b57875f64f24c
7
- data.tar.gz: ab52fa615cb6db3999a1fff035dbd30143e27f6f4a8eed2153e403a7f79ed257437892be78b61160dea9ce6d4a0fa59d1edf59c008b6006338a23aa57909b7b1
6
+ metadata.gz: 384444b896b5d29b91f7412ee1fae853f52f833bce68fc5df047ae96921632f0c2984827726767324706279bb93d654cec485f64dc90c2fa5cd73f9da38dc05f
7
+ data.tar.gz: 595eb3cafc35d0b30011edcfb905e2ba6ea23235662062d3507c22e949eb733f3beb04b2b8fff30fc4f5361bef7e837405e7678257f8861b058469b62a9caf39
data/Rakefile CHANGED
@@ -1,8 +1,6 @@
1
1
  require "bundler/gem_tasks"
2
2
  require "rspec/core/rake_task"
3
- require "isodoc/gem_tasks"
4
3
 
5
- IsoDoc::GemTasks.install
6
4
  RSpec::Core::RakeTask.new(:spec)
7
5
 
8
6
  task default: :spec
@@ -126,10 +126,12 @@ module Metanorma
126
126
  return node unless node.at(ns("./component[@class = 'step']"))
127
127
 
128
128
  d = node.at(ns("./component[@class = 'step']"))
129
- d = d.replace("<ol class='steps'><li>#{d.children.to_xml}</li></ol>")
129
+ id = d["id"] ? " id='#{d['id']}'" : ""
130
+ d = d.replace("<ol class='steps'><li#{id}>#{d.children.to_xml}</li></ol>")
130
131
  .first
131
132
  node.xpath(ns("./component[@class = 'step']")).each do |f|
132
- f = f.replace("<li>#{f.children.to_xml}</li>").first
133
+ id = f["id"] ? " id='#{f['id']}'" : ""
134
+ f = f.replace("<li#{id}>#{f.children.to_xml}</li>").first
133
135
  d << f
134
136
  end
135
137
  node
@@ -137,7 +139,8 @@ module Metanorma
137
139
 
138
140
  def recommendation_attributes1_component(node, out)
139
141
  node = recommendation_steps(node)
140
- out << "<tr><td>#{node['label']}</td><td>#{node.children}</td></tr>"
142
+ id = node["id"] ? " id='#{node['id']}'" : ""
143
+ out << "<tr#{id}><td>#{node['label']}</td><td>#{node.children}</td></tr>"
141
144
  out
142
145
  end
143
146
 
@@ -168,7 +171,8 @@ module Metanorma
168
171
  return reqt_dl(node.first_element_child, out)
169
172
  node.name == "component" and
170
173
  return recommendation_attributes1_component(node, out)
171
- out.add_child("<tr><td colspan='2'></td></tr>").first
174
+ id = node["id"] ? " id='#{node['id']}'" : ""
175
+ out.add_child("<tr#{id}><td colspan='2'></td></tr>").first
172
176
  .at(ns(".//td")) <<
173
177
  (preserve_in_nested_table?(node) ? node : node.children)
174
178
  out
@@ -56,8 +56,8 @@ module Metanorma
56
56
 
57
57
  def postprocess_anchor_struct(block, anchor)
58
58
  super
59
+ anchor[:xref_bare] = anchor[:xref]
59
60
  if l = block.at(ns("./identifier"))&.text
60
- anchor[:xref_bare] = anchor[:xref]
61
61
  anchor[:xref] += l10n(": ") + "<tt>#{l}</tt>"
62
62
  end
63
63
  anchor
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  class Requirements
3
- VERSION = "0.1.3".freeze
3
+ VERSION = "0.1.4".freeze
4
4
  end
5
5
  end
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.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-09-05 00:00:00.000000000 Z
11
+ date: 2022-09-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: isodoc-i18n