metanorma 1.6.2 → 1.6.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -29,6 +29,37 @@ module Metanorma
29
29
  end
30
30
  end
31
31
 
32
+ def self.recursive_string_keys(hash)
33
+ case hash
34
+ when Hash then hash.map { |k, v| [k.to_s, recursive_string_keys(v)] }.to_h
35
+ when Enumerable then hash.map { |v| recursive_string_keys(v) }
36
+ else
37
+ hash
38
+ end
39
+ end
40
+
41
+ def self.gather_bibitems(xml)
42
+ xml.xpath("//xmlns:bibitem[@id]").each_with_object({}) do |b, m|
43
+ m[b["id"]] = b
44
+ end
45
+ end
46
+
47
+ def self.gather_bibitemids(xml)
48
+ xml.xpath("//*[@bibitemid]").each_with_object({}) do |e, m|
49
+ /^semantic__/.match?(e.name) and next
50
+ m[e["bibitemid"]] ||= []
51
+ m[e["bibitemid"]] << e
52
+ end
53
+ end
54
+
55
+ def self.gather_citeases(xml)
56
+ xml.xpath("//*[@citeas]").each_with_object({}) do |e, m|
57
+ /^semantic__/.match?(e.name) and next
58
+ m[e["citeas"]] ||= []
59
+ m[e["citeas"]] << e
60
+ end
61
+ end
62
+
32
63
  class DisambigFiles
33
64
  def initialize
34
65
  @seen_filenames = []
@@ -1,3 +1,3 @@
1
1
  module Metanorma
2
- VERSION = "1.6.2".freeze
2
+ VERSION = "1.6.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.6.2
4
+ version: 1.6.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: 2023-09-11 00:00:00.000000000 Z
11
+ date: 2023-10-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor
@@ -260,6 +260,7 @@ files:
260
260
  - lib/metanorma/collection_fileparse.rb
261
261
  - lib/metanorma/collection_fileprocess.rb
262
262
  - lib/metanorma/collection_manifest.rb
263
+ - lib/metanorma/collection_render_utils.rb
263
264
  - lib/metanorma/collection_renderer.rb
264
265
  - lib/metanorma/compile.rb
265
266
  - lib/metanorma/compile_options.rb
@@ -268,6 +269,7 @@ files:
268
269
  - lib/metanorma/document.rb
269
270
  - lib/metanorma/extract.rb
270
271
  - lib/metanorma/files_lookup.rb
272
+ - lib/metanorma/files_lookup_sectionsplit.rb
271
273
  - lib/metanorma/fontist_utils.rb
272
274
  - lib/metanorma/input.rb
273
275
  - lib/metanorma/input/asciidoc.rb
@@ -275,6 +277,7 @@ files:
275
277
  - lib/metanorma/processor.rb
276
278
  - lib/metanorma/registry.rb
277
279
  - lib/metanorma/sectionsplit.rb
280
+ - lib/metanorma/sectionsplit_links.rb
278
281
  - lib/metanorma/util.rb
279
282
  - lib/metanorma/version.rb
280
283
  - lib/metanorma/worker_pool.rb