metanorma 1.7.3 → 1.7.4

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: c5b5382892120774eb414751a3e9e3d196f73263e904566a3e2a30593480dbb1
4
- data.tar.gz: 5e4fe2bac57854742838bdd57168dec395c5e8fd120f5d5b1b06e98ce2df8ad8
3
+ metadata.gz: d3a50d8116aadebecaf6fbdcdc1b9ffaee19cb233bf38ad6ea2f7b6b1b320fa8
4
+ data.tar.gz: 67283cbe9df47b100e3b6598f08bb7a00e9be1602d3a6cc7d41ff3b527673556
5
5
  SHA512:
6
- metadata.gz: 31eca9aa8f63edb4be1feea653d288ac41c57c805253bc08af0d2b8686a5a85be136e29dbc4aeed179d89dd2c28714752713f6ed7c7b8e28478692e15c1f90bf
7
- data.tar.gz: 2e84726aed63b99235576ea12ac5ba41cb05e943b0d70d5ebfec027529184e579b39f538bed63f058f83cdc6dda6a7dcb197d2f16b222d0e36825e71a1884797
6
+ metadata.gz: 195226d8f70127bfe659d1a032824482ec02911ca8f7f1e9d0f75f14f5b319e90912300345a50c05422b6dd87fc5b0b1674b11f66471e06c8ff79c39a4ab3db3
7
+ data.tar.gz: 4fbf96851ca7857e83767abbb86c13cc9a28130b289543f82b9d30841d55298703149b82d48597c6d25acc8ea7a0667ff00a49784187f471d0f685c0598a2104
@@ -20,8 +20,9 @@ module Metanorma
20
20
  end
21
21
 
22
22
  def get_bibitem_docid(bib, identifier)
23
- # IDs for repo references are untyped by default
24
- docid = bib.at(ns("./docidentifier[not(@type)]")) ||
23
+ docid =
24
+ bib.at(ns("./docidentifier[@type = 'metanorma-collection']")) ||
25
+ bib.at(ns("./docidentifier[not(@type)]")) ||
25
26
  bib.at(ns("./docidentifier"))
26
27
  docid &&= docid_prefix(docid)
27
28
  if @files.get(docid) then docid
@@ -38,6 +38,7 @@ module Metanorma
38
38
  end
39
39
 
40
40
  def one_doc_collection?
41
+ return false
41
42
  docs = 0
42
43
  @files.each_value do |v|
43
44
  v[:attachment] and next
@@ -206,7 +206,8 @@ module Metanorma
206
206
  output_folder: "#{ident}_collection",
207
207
  format: %i(html),
208
208
  coverpage: File.join(dir, "cover.html")).coverpage
209
- filename = one_doc_coll ? "#{ident}_index.html" : "index.html"
209
+ #filename = one_doc_coll ? "#{ident}_index.html" : "index.html"
210
+ filename = "#{ident}_index.html"
210
211
  FileUtils.mv "#{ident}_collection/index.html", File.join(dir, filename)
211
212
  FileUtils.rm_rf "#{ident}_collection"
212
213
  filename
@@ -40,7 +40,12 @@ module Metanorma
40
40
 
41
41
  def self.gather_bibitems(xml)
42
42
  xml.xpath("//xmlns:bibitem[@id]").each_with_object({}) do |b, m|
43
- m[b["id"]] = b
43
+ if m[b["id"]]
44
+ b.remove
45
+ next # we can't update duplicate bibitem, processing updates wrong one
46
+ else
47
+ m[b["id"]] = b
48
+ end
44
49
  end
45
50
  end
46
51
 
@@ -1,3 +1,3 @@
1
1
  module Metanorma
2
- VERSION = "1.7.3".freeze
2
+ VERSION = "1.7.4".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.3
4
+ version: 1.7.4
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-03-25 00:00:00.000000000 Z
11
+ date: 2024-04-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor