metanorma-plugin-lutaml 0.7.65 → 0.7.67

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: a219a16d1ef8d04a061f15f5e1a267dbec89c860be64ed06e3c9fcb3f655608e
4
- data.tar.gz: c15c55427c29505de786a4d0c5111c20098d89a1279e1e88dfc90a2a4c4ab453
3
+ metadata.gz: ff4a1fdfd30ff9ee4c26a25fcec80beb30ebec42596bda4ff9ce7f33a8fa08bc
4
+ data.tar.gz: fbad62a8ac032cdb2a9b97e9e53425896cd66cf1d8229c7841f97989d72868c1
5
5
  SHA512:
6
- metadata.gz: f0506bdbe474cc96c49164425fab37a59d3af21023a64d23bb83e52c2dbb43336e17b67ded88382724a5b2518613879e63409aceccb355d8e0624c0f3db1007d
7
- data.tar.gz: 47ec10b15ca88e3f6b5f1ee51c0be57cf81e212a208cbb166512d42b34dc14865a4428d91f53c815dd791e01e2bb6941a6d4c024a21ab769525bb7d27a8ababa
6
+ metadata.gz: 5703d0bf6d33fb4a042e8e284ea337fa032d951d5d617e8829df8106576e01c666794bb9753beba5df61371a66c5be036363e94b6c73e34396c02b21d75a01ed
7
+ data.tar.gz: bebf4a12e6bf8e5def96163eb827c1441348d97bdd2474b34b1a4f162771b443fb93704ecd720cc5de12bc8b7b71a3ab720c2fb7af171567ccb4add4c272c742
@@ -25,13 +25,29 @@ module Metanorma
25
25
  next unless bibitemid.start_with?("express_")
26
26
 
27
27
  name = bibitemid.sub(/\Aexpress_/, "")
28
- rec = lookup.call(name)
29
- while rec.nil? && name.include?("_")
30
- name = name.sub(/_[^_]+\z/, "")
31
- rec = lookup.call(name)
32
- end
33
- rec
28
+ schema_part, entity_full = name.include?(".") ? name.split(".", 2) : [nil, name]
29
+
30
+ # The entity name is fixed; only the page-stamp suffix chain
31
+ # after it is stripped. A stamp segment announces itself with
32
+ # an uppercase letter or a digit (ISO_DIS_10303-108_2025,
33
+ # Annex_D, EXPRESS-G_diagrams, iso10303-9002) - entity names
34
+ # are lowercase snake_case, so the trim can never migrate the
35
+ # asked entity onto a different declaration (#825: an
36
+ # undeclared line_segment must stay untargeted, not adopt
37
+ # line's record).
38
+ entity = stamp_trim(entity_full)
39
+ asked = [schema_part, entity_full].compact.join(".")
40
+ candidate = [schema_part, entity].compact.join(".")
41
+ lookup.call(asked) || lookup.call(candidate)
34
42
  end
43
+
44
+ # Drops the trailing stamp segments: everything from the first
45
+ # underscore-segment carrying an uppercase letter or a digit.
46
+ def self.stamp_trim(entity_full)
47
+ segments = entity_full.split("_")
48
+ kept = segments.take_while { |segment| segment !~ /[A-Z0-9]/ }
49
+ kept.empty? ? entity_full : kept.join("_")
50
+ end
35
51
  end
36
52
  end
37
53
  end
@@ -1,7 +1,7 @@
1
1
  module Metanorma
2
2
  module Plugin
3
3
  module Lutaml
4
- VERSION = "0.7.65".freeze
4
+ VERSION = "0.7.67".freeze
5
5
  end
6
6
  end
7
7
  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.65
4
+ version: 0.7.67
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-10 00:00:00.000000000 Z
11
+ date: 2026-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor