isodoc 2.1.4 → 2.1.5

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: 214cd3cfadc0aeca476766aff0722c06a46b5410beedbb9a49fd47ed15249850
4
- data.tar.gz: f0e79db9f9dd1b456da5ba4eda163e7189509236e45f688faa92fcf821c158de
3
+ metadata.gz: c0dec55aba65a594c5a4ef3916219976edb11e162aee6f806f05bc587466941a
4
+ data.tar.gz: 47ef329be8d9b6aff1777820aa4901a74400888196227ea5dc08a218793e6f87
5
5
  SHA512:
6
- metadata.gz: 2e57a7551ccebc9fedc40520a1ff96d87d25de8f4c3501400d9cfdac41d4e0014f25e9b5a7d0eb9c03c6c3cf0c0a0dd3a992327591ecfcb474c6c7c369377e15
7
- data.tar.gz: 630fb8c95eccafb843d2f25459494705087dde8c4fe857be5183fdab62eb71da7fb9211d2bbe2dc30c67a87e4ce199c200c9a53eabf5ba90a74e249005f8d997
6
+ metadata.gz: fd9d0f72fdef518808f6605953fa11d6033c5693a8851807b617bacc0d43315657ed80b8de93f0f46bcfb9d0529f327d647e00947234c5ebefa8666250b57ea9
7
+ data.tar.gz: 3ef2cc2b5f97c2358e5e888865c8406ce66808e3fb7e62804646b71838ad748e372880ce359648dadd581bc36205e6d347aedbe220f2c9d6a1a7f5ee130d8055
@@ -16,7 +16,7 @@ module IsoDoc
16
16
  xpath.gsub(%r{/([a-zA-z])}, "/xmlns:\\1")
17
17
  .gsub(%r{::([a-zA-z])}, "::xmlns:\\1")
18
18
  .gsub(%r{\[([a-zA-z][a-z0-9A-Z@/]* ?=)}, "[xmlns:\\1")
19
- .gsub(%r{\[([a-zA-z][a-z0-9A-Z@/]*[/\]])}, "[xmlns:\\1")
19
+ .gsub(%r{\[([a-zA-z][a-z0-9A-Z@/]*[/\[\]])}, "[xmlns:\\1")
20
20
  end
21
21
 
22
22
  def liquid(doc)
@@ -81,6 +81,10 @@ module IsoDoc
81
81
  docxml.xpath(ns("//references/bibitem")).each do |x|
82
82
  bibitem(x)
83
83
  end
84
+ docxml.xpath(ns("//references[bibitem/@hidden = 'true']")).each do |x|
85
+ x.at(ns("./bibitem[not(@hidden = 'true')]")) and next
86
+ x["hidden"] = "true"
87
+ end
84
88
  @xrefs.parse_inclusions(refs: true).parse(docxml)
85
89
  end
86
90
 
@@ -82,8 +82,13 @@ module IsoDoc
82
82
  p = node.at(ns("./preferred"))
83
83
  ref = node.at(ns("./xref | ./eref | ./termref"))
84
84
  label = @i18n.relatedterms[node["type"]].upcase
85
- node.replace(l10n("<p><strong>#{label}:</strong> "\
86
- "<em>#{p.to_xml}</em> (#{ref.to_xml})</p>"))
85
+ if p && ref
86
+ node.replace(l10n("<p><strong>#{label}:</strong> "\
87
+ "<em>#{p.to_xml}</em> (#{ref.to_xml})</p>"))
88
+ else
89
+ node.replace(l10n("<p><strong>#{label}:</strong> "\
90
+ "<strong>**RELATED TERM NOT FOUND**</strong></p>"))
91
+ end
87
92
  end
88
93
 
89
94
  def designation(docxml)
@@ -1,3 +1,3 @@
1
1
  module IsoDoc
2
- VERSION = "2.1.4".freeze
2
+ VERSION = "2.1.5".freeze
3
3
  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.1.4
4
+ version: 2.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-04 00:00:00.000000000 Z
11
+ date: 2022-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciimath