metanorma-plugin-lutaml 0.7.94 → 0.7.96

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: 4a034f4429bf6f4afb9c76c699297b7f6980c15a67db07d46c58ef186c6b06e8
4
- data.tar.gz: e971918f21c4a71c927579982dadf1ea51de2954adabaed48f4022bf253472da
3
+ metadata.gz: 3c9fdd51b9567847b1afc12410ff86e1376c285bc97afb532336fe26d74d5060
4
+ data.tar.gz: 8f2e6e5f3c487371e3ffc07c39dfcf6fb32f4f007fac2a261535c068baea9834
5
5
  SHA512:
6
- metadata.gz: 55d91d7076114b5bef00f5369c509ac4e09e53e4ea46ef9ccd15ae92ce6673614e9e729e5e5a5da3af840f6851180a43831e7dafc1d3741f4eb4a434d4ffff5d
7
- data.tar.gz: 5fbb0f8aec6d642b26fd7da3b107aae119421ee085cbc13f444ca7baca4d277637033b265da6b16b78c4b204812256596312dd12a9e50df552815f644db28f1b
6
+ metadata.gz: 717c011a8452fd69fdd348dfa33376709b21b046bb46ec91e53ca761de3f77cd42b7af5842a33165d62717ddb7080cbe2a0fffed96ee0800d2749d5ba894dc92
7
+ data.tar.gz: 891de01e049891e2fdfe305f8639d6dc1513698ddfde20d12ecd1388de2e9701a45633755f8db33fb99691d2fd715c2721e8aa609eb4eaf577eeed8cc8e83514
data/Gemfile CHANGED
@@ -4,7 +4,11 @@ Encoding.default_internal = Encoding::UTF_8
4
4
  source "https://rubygems.org"
5
5
  git_source(:github) { |repo| "https://github.com/#{repo}" }
6
6
 
7
- gemspec
7
+ # Root-level glob: bundler's path-source default ({,*,*/*}.gemspec) also
8
+ # matches nested gemspecs, and its deepest-first index lets a git
9
+ # worktree checkout override the root gem's spec — loading stale code
10
+ # from inside the repo (the ea gem hit exactly this).
11
+ gemspec glob: "*.gemspec"
8
12
 
9
13
  begin
10
14
  eval_gemfile("Gemfile.devel")
@@ -45,12 +45,15 @@ module Metanorma
45
45
  # still surface loudly.
46
46
  module ExpressRemarkFigures
47
47
  # A bare relative image macro: `image::name.svg[]`. Absolute
48
- # paths, URLs, data URIs, liquid references and macros carrying
49
- # an attribute list stay as written.
48
+ # paths, URLs, data URIs and liquid references stay as written.
50
49
  # An optional attribute list is allowed: the WG12 remark figures
51
50
  # carry captions (`image::images/x.svg[EXPRESS-G diagram]`), and
52
- # the empty-list-only form skipped them silently (#371).
53
- IMAGE_MACRO_REGEXP = /\Aimage::([^:\s{}]+)\[[^\]]*\]\s*\z/
51
+ # the empty-list-only form skipped them silently (#371). The
52
+ # trailing-glued list-continuation form (`image::name.svg[]+`,
53
+ # iso-10303#862) matches too — its figure stages like any other
54
+ # and the line re-emits with the `+` on its own line, the form
55
+ # asciidoctor parses as an image block joining the next line.
56
+ IMAGE_MACRO_REGEXP = /\Aimage::([^:\s{}]+)\[[^\]]*\]\+?\s*\z/
54
57
 
55
58
  # An imagesdir attribute entry; the bang form unsets. The LAST
56
59
  # entry in the source is the one in force where the member
@@ -135,10 +138,27 @@ module Metanorma
135
138
  # joined the way expressir's remark formatter joins them --
136
139
  # while the model-level methods keep the source listing
137
140
  # printing the macros as written.
141
+ #
142
+ # The continuation forms normalize here too (iso-10303#862):
143
+ # WG 12 remark sources glue the asciidoctor list-continuation
144
+ # onto the macro line (`image::x.gif[]+`, joining the following
145
+ # prose) and precede macros with a bare `+` (attaching the
146
+ # figure to the item). Both are valid constructs when they
147
+ # reach asciidoctor intact, but the glued form parses as
148
+ # paragraph text and the blank-line separation below cuts a
149
+ # directly-preceding `+` off its figure - the four
150
+ # kinematic_structure_schema figure constructs printed as
151
+ # literal macro text. The glued `+` moves to its own line
152
+ # (image block, then the continuation joining the next line),
153
+ # and a `+` kept directly before its figure stays attached.
138
154
  def to_s
139
155
  remarks.join("\n")
140
156
  .gsub(/^[ \t]+(?=image::)/, "")
157
+ .gsub(/^image::([^:\s{}]+\[[^\]]*\])\+/) do
158
+ "#{Regexp.last_match(1)}\n+"
159
+ end
141
160
  .gsub(/^(?!$)(image::)/) { "\n\n#{Regexp.last_match(1)}" }
161
+ .gsub(/\+\n\n+(?=image::)/, "+\n")
142
162
  end
143
163
  end
144
164
 
@@ -199,7 +219,20 @@ module Metanorma
199
219
  return @errors[before..].join("\n")
200
220
  end
201
221
 
202
- return line if final == match[1]
222
+ emit_rewrite(line, match[1], final)
223
+ end
224
+
225
+ # The rewritten line: a glued continuation re-emits with the
226
+ # `+` on its own line (the construct renders as an image
227
+ # joining the next line instead of literal paragraph text,
228
+ # #862); a line whose figure already stands staged keeps as
229
+ # written; anything else rewrites the target to the staged
230
+ # form.
231
+ def emit_rewrite(line, target, final)
232
+ return "#{line[/\Aimage::/]}#{final}[]\n+\n" if
233
+ line.match?(/\]\+\s*\z/)
234
+
235
+ return line if final == target
203
236
 
204
237
  trailing = line.length - line.rstrip.length
205
238
  suffix = trailing.positive? ? line[-trailing, trailing] : ""
@@ -1,7 +1,7 @@
1
1
  module Metanorma
2
2
  module Plugin
3
3
  module Lutaml
4
- VERSION = "0.7.94".freeze
4
+ VERSION = "0.7.96".freeze
5
5
  end
6
6
  end
7
7
  end
@@ -38,8 +38,13 @@ Gem::Specification.new do |spec|
38
38
  # >= 0.6.157: first release with the Qea::Rules layer and the shipped
39
39
  # ea/qea/rules/generalization.rb (0.6.149-0.6.156 are broken for the
40
40
  # diagram/Liquid-drops path — lutaml/ea#234, #246). Ea::Xmi.load/load_graph
41
- # (lutaml/ea#86): the partial-load API this gem calls.
42
- spec.add_dependency "ea", "~> 0.6.160"
41
+ # (lutaml/ea#86): the partial-load API this gem calls. >= 0.6.167: the
42
+ # .qea klass-table routing resolves Ea::Qea::LazyDrops.parsed_graph
43
+ # (lutaml/ea#278; 0.6.166 lacks it). >= 0.6.176: the deferred-table
44
+ # lazy path, LRU-capped class graph and instantiate-based hydration
45
+ # shipped across 0.6.167-0.6.176 (#278); the floor tracks the line we
46
+ # test against.
47
+ spec.add_dependency "ea", "~> 0.6.176"
43
48
  spec.add_dependency "expressir", "~> 2.5.0"
44
49
  spec.add_dependency "isodoc", ">= 3.5.0"
45
50
  spec.add_dependency "liquid", "~> 5"
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.94
4
+ version: 0.7.96
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-28 00:00:00.000000000 Z
11
+ date: 2026-12-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 0.6.160
75
+ version: 0.6.176
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 0.6.160
82
+ version: 0.6.176
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: expressir
85
85
  requirement: !ruby/object:Gem::Requirement