metanorma-plugin-lutaml 0.7.55 → 0.7.57

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: 608d678b19ef1c180dc4e244f98d329a8452d9c875469978b6d84247894c09d5
4
- data.tar.gz: 64269c82a46666d5b50df626671d985917c6acb845708a8d527b6070a2da9e1e
3
+ metadata.gz: eb9c176145db89f41f691658a755ce2f94cd8a1f1f302dd328deb4ec0286c5b0
4
+ data.tar.gz: '0309da4d8a37de8b907e77b7ab46b27f7e6d67269a1dc9ce37fb2150b9f887d6'
5
5
  SHA512:
6
- metadata.gz: 9078948b7bd2f32a925871da5b6f51f54d6613a660c20dff4e0c19d1f72c77814f5877f02700926eb031b33dae6de3aae7bc09668a65581f8d9287db0d29a9ad
7
- data.tar.gz: 10fa46ed3a240a00777df9f10621b1cdb5e5e35646958bf9b94b830ebacd8ca8b520dd367dcab4d9019a7042a19ec57270e8cea5d9cb63212ec957fdf0f8d6bf
6
+ metadata.gz: a4884c1d32422983d9c5ab5388c63c7a0937526a561a6b4ba5c1043f0250d389efeee2d475d750c3f1f90983caae66aa3b156beeb4551dc093ea1e63a44e95b4
7
+ data.tar.gz: cc10688b5530b8068fa25176e84dceb950e29a355781be749e9a6f6709b5331f64391466db046cd58013f30911ec0ac68d7cd25ee938a51e5e6c04d0b89c4ab1
data/Gemfile CHANGED
@@ -25,13 +25,10 @@ gem "timecop"
25
25
  gem "vcr"
26
26
  gem "webmock"
27
27
 
28
- # leptris 1.9.367.0 is the highest match for standoc's '~> 1.9.361' but
29
- # publishes only linux prebuilds plus a ruby gem with no vendored
30
- # libleptris; windows-latest falls back to that ruby gem and dies on
31
- # require "metanorma-standoc". 1.9.361.1 is the latest that still ships
32
- # x64-mingw-ucrt (and darwin) binaries. Lift once upstream packs Windows
33
- # again.
34
- gem "leptris", "~> 1.9.361.1"
28
+ # moxml requires leptris >= 1.9.386 (older bindings are rejected at
29
+ # load: Moxml::AdapterError). 1.9.39x ships every platform again,
30
+ # including x64-mingw-ucrt, so the old Windows-gap pin is gone.
31
+ gem "leptris", ">= 1.9.386"
35
32
 
36
33
  # pre-release line pins (see metanorma release wave)
37
34
  gem "isodoc", github: "metanorma/isodoc", branch: "main"
@@ -17,6 +17,12 @@ module Metanorma
17
17
  )
18
18
  resolved = document.path_resolver
19
19
  .system_path(file_path, docfile_directory)
20
+ # The decorator expands emitted paths against this base: relative
21
+ # prefixes alone get re-anchored by asciidoctor's imagesdir
22
+ # handling (images/../../schemas collapses a level), so the
23
+ # decoration must produce paths that resolve from the docfile.
24
+ options["relative_path_base"] =
25
+ File.expand_path(docfile_directory)
20
26
  # The prefix lands inside emitted image macros, so it must not
21
27
  # carry the absolute build path: two builds of the same tree in
22
28
  # two directories produced different image/@src values
@@ -60,8 +60,26 @@ module Metanorma
60
60
  end
61
61
 
62
62
  def prefix_relative_paths(line, path_prefix)
63
+ # Decorated remarks live on models shared across documents and
64
+ # preprocess passes: a second pass over an already-decorated line
65
+ # would stack the prefix again (paths like
66
+ # ../schemas/schemas/schemas/... rendered unusable). Idempotent:
67
+ # a line that carries this prefix is left alone.
68
+ return line if path_prefix && line.include?(path_prefix)
69
+
63
70
  line.gsub(RELATIVE_PREFIX_MACRO_REGEXP) do |_match|
64
- full_path = File.expand_path(File.join(path_prefix, $3.strip))
71
+ # Expand against the docfile directory (passed by the adapter
72
+ # as relative_path_base), NOT the process CWD: a CWD expansion
73
+ # produced absolute image paths under whatever directory the
74
+ # build was launched from (e.g. <repo>/../../schemas/...).
75
+ # The absolute result is deliberate: relative targets are
76
+ # re-anchored by asciidoctor's imagesdir handling
77
+ # (images/../../schemas collapses a level), which made every
78
+ # decorated diagram unresolvable at render time.
79
+ full_path = File.expand_path(
80
+ File.join(path_prefix, $3.strip),
81
+ options["relative_path_base"] || Dir.pwd,
82
+ )
65
83
  "#{$1}#{$2}#{full_path}#{$4}"
66
84
  end
67
85
  end
@@ -1,7 +1,7 @@
1
1
  module Metanorma
2
2
  module Plugin
3
3
  module Lutaml
4
- VERSION = "0.7.55".freeze
4
+ VERSION = "0.7.57".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.55
4
+ version: 0.7.57
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-10-29 00:00:00.000000000 Z
11
+ date: 2026-10-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor