metanorma-gb 1.2.4 → 1.3.0

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: d2e72d488a261291e202a179c57113ec315b78fbaf73aa2c842ea711412d219d
4
- data.tar.gz: cb675f99f57b66794bc465c6b6950bf9c949b72593d50e91770719b593d36c8e
3
+ metadata.gz: 5bc1b7d14c6fb7838469307406ad9d9942ca59faedbc998f2a4c49db97f02701
4
+ data.tar.gz: 79fbf7df72778a85f056b2bdb8dd5f9d96733fb11fb21c243ae9c9d3fa77d330
5
5
  SHA512:
6
- metadata.gz: 0420f05b150aa97334b747bf99e0ab1db2a8e77915a638307a3f737be9b018ebc1032df787177dece749b1aa8d3a8827375b3b4569bcf3fd431a5f63fbe36993
7
- data.tar.gz: c544bdc3ce059ff8b54ff3f1ddee7cbb4978e8841b2d8125095c6d118ff1bb3bb8b55b9fc66ffeeb797e9cab6008949a3e4d2859e0e5bb8103489673afe88645
6
+ metadata.gz: 70999dfd783e9d8a955a4bdb715c862c4695d8057095f9fada0fead6d6f0b5ae0abca77e702ca1fcdc2ab7f8a0d3b195d6117e66f61f0a73954f4a9f70e8500b
7
+ data.tar.gz: 38de8f7e1f2326d3b8f96d259e49eb03d17e596f901d91a6ba2a844f0b31e390c75d101109b0e5b5125c946b2cc0cacf2f9c2cadf74b438cbb7b49ff8c9b38c4
@@ -184,12 +184,7 @@ module Asciidoctor
184
184
  def fetch_ref(xml, code, year, **opts)
185
185
  code = "CN(#{code})" if !/^CN\(/.match(code) &&
186
186
  /^#{GBCODE}[^A-Za-z]/.match(code)
187
- hit = @bibdb&.fetch(code, year, opts)
188
- return nil if hit.nil?
189
- xml.parent.add_child(Asciidoctor::Standoc::Utils::smart_render_xml(hit))
190
- xml
191
- rescue Algolia::AlgoliaProtocolError
192
- nil # Render reference without an Internet connection.
187
+ super
193
188
  end
194
189
 
195
190
  def cleanup(xmldoc)
@@ -87,7 +87,7 @@
87
87
  </element>
88
88
  </define>
89
89
  <define name="reqinherit">
90
- <element name="subject">
90
+ <element name="inherit">
91
91
  <text/>
92
92
  </element>
93
93
  </define>
@@ -77,11 +77,11 @@ module IsoDoc
77
77
  out.table **{ class: "dl" } do |v|
78
78
  node.elements.each_slice(2) do |dt, dd|
79
79
  v.tr do |tr|
80
- tr.td **{ valign: "top", align: "left" } do |term|
80
+ tr.td **{ style: "vertical-align:top;text-align:left;" } do |term|
81
81
  dt_parse(dt, term)
82
82
  end
83
- tr.td(**{ valign: "top" }) { |td| td << "&mdash;" }
84
- tr.td **{ valign: "top" } do |listitem|
83
+ tr.td(**{ style: "vertical-align:top;" }) { |td| td << "&mdash;" }
84
+ tr.td **{ style: "vertical-align:top;" } do |listitem|
85
85
  dd.children.each { |n| parse(n, listitem) }
86
86
  end
87
87
  end
@@ -90,8 +90,8 @@ module IsoDoc
90
90
  end
91
91
 
92
92
  EXAMPLE_TBL_ATTR =
93
- { valign: "top", class: "example_label",
94
- style: "padding:2pt 2pt 2pt 2pt" }.freeze
93
+ { class: "example_label",
94
+ style: "padding:2pt 2pt 2pt 2pt;vertical-align:top;" }.freeze
95
95
 
96
96
  def example_label(node)
97
97
  l10n(super + ":")
@@ -105,7 +105,7 @@ module IsoDoc
105
105
  tr.td **EXAMPLE_TBL_ATTR do |td|
106
106
  td << l10n(note_label(node) + ":")
107
107
  end
108
- tr.td **{ valign: "top", class: "Note" } do |td|
108
+ tr.td **{ style: "vertical-align:top;", class: "Note" } do |td|
109
109
  node.children.each { |n| parse(n, td) }
110
110
  end
111
111
  end
@@ -120,7 +120,7 @@ module IsoDoc
120
120
  tr.td **EXAMPLE_TBL_ATTR do |td|
121
121
  td << l10n("#{anchor(node['id'], :label)}:")
122
122
  end
123
- tr.td **{ valign: "top", class: "Note" } do |td|
123
+ tr.td **{ style: "vertical-align:top;", class: "Note" } do |td|
124
124
  node.children.each { |n| parse(n, td) }
125
125
  end
126
126
  end
@@ -102,16 +102,16 @@ module IsoDoc
102
102
 
103
103
  def stage_abbrev(stage, iter, draft)
104
104
  stage = STAGE_ABBRS[stage.to_sym] || "??"
105
- stage += iter.text if iter
106
- stage = "Pre" + stage if draft&.text =~ /^0\./
105
+ stage += iter if iter
106
+ stage = "Pre" + stage if draft =~ /^0\./
107
107
  stage
108
108
  end
109
109
 
110
110
  def stage_abbrev_cn(stage, iter, draft)
111
111
  return stage_abbrev(stage, iter, draft) if @lang != "zh"
112
112
  stage = STAGE_ABBRS_CN[stage.to_sym] || "??"
113
- stage = "#{iter.text.to_i.localize(:zh).spellout.force_encoding("UTF-8")}次#{stage}" if iter
114
- stage = "Pre" + HTMLEntities.new.encode(stage, :hexadecimal) if draft&.text =~ /^0\./
113
+ stage = "#{iter.to_i.localize(:zh).spellout.force_encoding("UTF-8")}次#{stage}" if iter
114
+ stage = "Pre" + HTMLEntities.new.encode(stage, :hexadecimal) if draft =~ /^0\./
115
115
  stage
116
116
  end
117
117
 
@@ -121,8 +121,9 @@ module IsoDoc
121
121
  if docstatus
122
122
  set(:stage, docstatus.text.to_i)
123
123
  set(:unpublished, docstatus.text.to_i < 60)
124
- abbr = stage_abbrev_cn(docstatus.text, isoxml.at(ns("//bibdata/status/iteration")),
125
- isoxml.at(ns("//version/draft")))
124
+ abbr = stage_abbrev_cn(docstatus.text,
125
+ isoxml&.at(ns("//bibdata/status/iteration"))&.text,
126
+ isoxml&.at(ns("//version/draft"))&.text)
126
127
  set(:stageabbr, abbr)
127
128
  set(:status, STATUS_CSS[docstatus.text.to_sym])
128
129
  end
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Gb
3
- VERSION = "1.2.4"
3
+ VERSION = "1.3.0"
4
4
  end
5
5
  end
data/metanorma-gb.gemspec CHANGED
@@ -29,8 +29,8 @@ Gem::Specification.new do |spec|
29
29
  spec.require_paths = ["lib"]
30
30
  spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
31
31
 
32
- spec.add_dependency "metanorma-iso", "~> 1.2.0"
33
- spec.add_dependency "isodoc", "~> 0.10.0"
32
+ spec.add_dependency "metanorma-iso", "~> 1.3.0"
33
+ spec.add_dependency "isodoc", "~> 1.0.0"
34
34
  spec.add_dependency "twitter_cldr", "~> 4.4.4"
35
35
  spec.add_dependency "gb-agencies", "~> 0.0.4"
36
36
  spec.add_dependency "htmlentities", "~> 4.3.4"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-gb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.4
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-08-04 00:00:00.000000000 Z
11
+ date: 2019-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-iso
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.2.0
19
+ version: 1.3.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 1.2.0
26
+ version: 1.3.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: isodoc
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.10.0
33
+ version: 1.0.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.10.0
40
+ version: 1.0.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: twitter_cldr
43
43
  requirement: !ruby/object:Gem::Requirement