isodoc 2.8.0 → 2.8.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7399ef0fe36a0b345f15af67b09daec6f68ed36ce2226af1469ace300d4e3fa9
4
- data.tar.gz: 5d03fbb31c3a38b11ca47d34a1673326f68e7db9f577de5995944b4c1e77d1f1
3
+ metadata.gz: 3a4ea94214377595240bcb873426fb3170509fd7e535b2c277fff4dbb6077f95
4
+ data.tar.gz: 46c9e47211dbbd225871f4ea91a86697c119b0d60a5359b974795c303becca18
5
5
  SHA512:
6
- metadata.gz: 3b5fb43c2a320525f7a1ce8e30d376ee687fd3295e16aa9336e846db7f93958d130e50b896216cbc651e4b33037840c97d9df2b6a9f578cc8dfef34a89bed098
7
- data.tar.gz: 5b9bb3130bde935c9d420c02092d5c341ed2bdb18e7a5aaa2e718a58798c165c8130b7a036ff4619b19ef2655d41223a7f13b5c110bd0e5b2881a877920d0119
6
+ metadata.gz: 9862cb11f6f06fb48052a21c5a1289e53677a2d357da003434d66251a28fd4c62cda42696e2d906448f791edd485545bc7a7257764eabeb6125f35ef287dfd15
7
+ data.tar.gz: db953889f3de823b3bb107d9c694088c81fc68ebf16d8f75cd38d78aef13b5794b0349cff181e8c1f9c3566b16c9b8ffa7da57a8baa02cfb937317658d807c79
@@ -58,8 +58,8 @@ module IsoDoc
58
58
  def iso?(org)
59
59
  name = org&.at(ns("./name"))&.text
60
60
  abbrev = org&.at(ns("./abbreviation"))&.text
61
- (abbrev == "ISO" ||
62
- name == "International Organization for Standardization")
61
+ abbrev == "ISO" ||
62
+ name == "International Organization for Standardization"
63
63
  end
64
64
 
65
65
  def agency1(xml)
@@ -16,7 +16,7 @@ module IsoDoc
16
16
  s = docxml.at(ns("//sections")) ||
17
17
  docxml.at(ns("//preface"))&.after("<sections/>")&.next_element ||
18
18
  docxml.at(ns("//annex | //bibliography"))&.before("<sections/>")
19
- &.previous_element or return
19
+ &.previous_element or return
20
20
  docxml.xpath(ns(@xrefs.klass.norm_ref_xpath)).each do |r|
21
21
  s << r.remove
22
22
  end
@@ -163,7 +163,7 @@ module IsoDoc
163
163
  # else, use both ordinal, as prefix, and ids
164
164
  def biblio_ref_entry_code(ordinal, ids, _id, _standard, datefn, _bib)
165
165
  # standard and id = nil
166
- ret = (ids[:ordinal] || ids[:metanorma] || "[#{ordinal}]")
166
+ ret = ids[:ordinal] || ids[:metanorma] || "[#{ordinal}]"
167
167
  if ids[:sdo]
168
168
  ret = prefix_bracketed_ref(ret)
169
169
  ret += "#{ids[:sdo]}#{datefn}, "
@@ -1,3 +1,3 @@
1
1
  module IsoDoc
2
- VERSION = "2.8.0".freeze
2
+ VERSION = "2.8.1".freeze
3
3
  end
@@ -99,7 +99,7 @@ module IsoDoc
99
99
  def word_tab_clean(docxml)
100
100
  docxml.xpath("//p[@class='Biblio']//span[@style='mso-tab-count:1']")
101
101
  .each do |s|
102
- s.next.text? or next
102
+ s.next&.text? or next
103
103
  s.next.replace(@c.encode(s.next.text.sub(/^\s+/, ""), :hexadecimal))
104
104
  end
105
105
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: isodoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.0
4
+ version: 2.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-09 00:00:00.000000000 Z
11
+ date: 2024-02-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: html2doc