metanorma-plugin-lutaml 0.7.64 → 0.7.66

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: 38cf4c201317e4cccd775acaeaacd74e12ad4405aea44f1cab6baa92fca6657b
4
- data.tar.gz: 32178d03c318d215048194169b8419fba33db8682acceca2c212caf6bab2da31
3
+ metadata.gz: b8d40464a30fd18db96d4e7fadc9523442ae1be067ce4ee1d61dc8407823e1a5
4
+ data.tar.gz: fa3fe6aa9238da527a0c70c031856063c798b82c10fc1c6d9a088d9d70b661e6
5
5
  SHA512:
6
- metadata.gz: a1d9df4d1c8204ac9baf0e94c25f4cafc628a3717f4f2ba2b06c7b0c732cd9342e53dac7799c8a812133371132cb0292af2882cac621c51fcba71450f723b2a9
7
- data.tar.gz: 3d276422d4302805615607cc6a9de50dd3e3a6b79a1d656dec01ecbb193e26b9b9eebf2faf7ceecd7c502eb5cadee28c14e11d86cb1914d09b2883095d7b861d
6
+ metadata.gz: 4c580e1b41173621091295c131cf297f3fbcc435916c7355095c7649f8739a691d68c8ac668a98a3cf2e94f4fdeed3ded47e07889f651b754c80190df1c4815f
7
+ data.tar.gz: 445402c52455e456c6e867635c53679025314a84c61a49937aa4bad24f7ca41c19ccea4ee5cc7cc8a0b34f08cd0e5839b003958d02ca7900fa1ea89f9cf8b19b
@@ -11,12 +11,30 @@ module Metanorma
11
11
  # so EXPRESS figure hotspot links bind to the declaration pages
12
12
  # instead of falling to the reference list (metanorma#656 family;
13
13
  # the core renderer registers no resolvers of its own).
14
+ #
15
+ # On section-split pages the split pass suffixes the hidden
16
+ # bibitems per page, so the svgmap eref's bibitemid carries the
17
+ # citing page's own suffix chain after the entity name
18
+ # ("express_geometry_schema.line_ISO_DIS_10303-108_2025_..._Annex_D_...").
19
+ # Lookup therefore walks prefixes from the full name down to
20
+ # "<schema>.<entity>", first unique match wins - the shortest
21
+ # candidate is the declaration closest to the asked entity.
14
22
  module ExpressHotspotAnchor
15
- Metanorma::Collection::Renderer::Svg
23
+ Metanorma::Collection::Renderer
16
24
  .register_reference_anchor_resolver do |bibitemid, lookup|
17
25
  next unless bibitemid.start_with?("express_")
18
26
 
19
- lookup.call(bibitemid.sub(/\Aexpress_/, ""))
27
+ name = bibitemid.sub(/\Aexpress_/, "")
28
+ rec = lookup.call(name)
29
+ # Cut at the LAST underscore: page-suffix chains carry doubled
30
+ # underscores ("..._Annex_D__informative__EXPRESS-G_diagrams"),
31
+ # and a trailing "_" defeats /_[^_]+\z/ entirely - the name
32
+ # would never shrink and the walk would never end (#346).
33
+ while rec.nil? && (idx = name.rindex("_"))
34
+ name = name[0...idx]
35
+ rec = lookup.call(name)
36
+ end
37
+ rec
20
38
  end
21
39
  end
22
40
  end
@@ -1,7 +1,7 @@
1
1
  module Metanorma
2
2
  module Plugin
3
3
  module Lutaml
4
- VERSION = "0.7.64".freeze
4
+ VERSION = "0.7.66".freeze
5
5
  end
6
6
  end
7
7
  end
@@ -90,8 +90,8 @@ autoload :GmlDictionaryEntryDrop,
90
90
  # for the EXPRESS vocabulary's hidden bibitems (a load-time side effect,
91
91
  # not a lazily-referenced class). Guarded for stacks without the
92
92
  # metanorma#658 renderer seam.
93
- if defined?(Metanorma::Collection::Renderer::Svg) &&
94
- Metanorma::Collection::Renderer::Svg
93
+ if defined?(Metanorma::Collection::Renderer) &&
94
+ Metanorma::Collection::Renderer
95
95
  .respond_to?(:register_reference_anchor_resolver)
96
96
  require "metanorma/plugin/lutaml/express_hotspot_anchor"
97
97
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-plugin-lutaml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.64
4
+ version: 0.7.66
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-11-08 00:00:00.000000000 Z
11
+ date: 2026-11-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor