metanorma-core 0.2.6 → 0.2.7

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: 3c990f6d36cdef2ab706c4dfe7fec3c9f907f07f3a13a684046dad22bd8963d2
4
- data.tar.gz: 9f286a92d6cbd320acf0e82a542deee25e0f71785943a9908293247d90f21922
3
+ metadata.gz: b063c41558221ddf0a4597a01e5b71ebbeb22f41138bbc3f48f626e33388b460
4
+ data.tar.gz: d6d64bcbccc4cf0910c7c9d89eadad251b1b8fb7dbfb4e6e9fd4b7e124575e7c
5
5
  SHA512:
6
- metadata.gz: c4602bee7990f224eafe646f1ee53f54f403d4dfb4e016031135d226fef8b152e8ef713d1810a113b0da4d01c4e99960182c2a649b55d68f2a05a6fcbf8a7f27
7
- data.tar.gz: a9f8cc76a73eeb02f4a8d78e6b495119a437d43fae6f519fb1cefaeca296670b0c993bba3969ff99ef2f82bbcdef608cccaded6f70614b1bca13dd2126ef6fdb
6
+ metadata.gz: bf69480d979cd4c2ce1d517175ba1197d837dd814d327feff678253a63027a1eb87e06928e91fa8d56ad2596b72ae4f09d544d10bc827d4a440d02bacdf056f3
7
+ data.tar.gz: 4a807ecb5b3c84ff1d9866f5b96ae6fecf434f4bf4bd4f0ece488882f31db4fd43b2baf34dedb713161b58122cbac2544b05b2182ebdca1d2d8687ff2b017e8e
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Core
3
- VERSION = "0.2.6".freeze
3
+ VERSION = "0.2.7".freeze
4
4
  end
5
5
  end
@@ -19,7 +19,10 @@ module Metanorma
19
19
  # +:standoc+).
20
20
  # @param options [Hash] passthrough options. Recognised:
21
21
  # +:log+ (Asciidoctor logger), +:novalid+ (skip validation),
22
- # +:output_dir+ (forwarded as the +output_dir+ attribute).
22
+ # +:output_dir+ (forwarded as the +output_dir+ attribute),
23
+ # +:base_dir+ (asset anchor: the directory that Asciidoctor
24
+ # resolves relative asset paths against and jails includes
25
+ # within; defaults to the process working directory).
23
26
  # @return [String] Asciidoctor convert output.
24
27
  def process(file, filename, type, options = {})
25
28
  require "asciidoctor"
@@ -33,6 +36,13 @@ module Metanorma
33
36
  header_footer: true, log: options[:log],
34
37
  novalid: options[:novalid],
35
38
  attributes: attrs }
39
+ # A string conversion without base_dir anchors Asciidoctor at the
40
+ # process working directory: asset macro targets and the
41
+ # safe-mode include jail all resolve against it, making the
42
+ # compile output depend on where it was invoked from. An
43
+ # explicit base_dir anchors them at the given directory instead.
44
+ options[:base_dir] and
45
+ out_opts[:base_dir] = File.expand_path(options[:base_dir])
36
46
  ::Asciidoctor.convert(file, out_opts)
37
47
  end
38
48
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-10-30 00:00:00.000000000 Z
11
+ date: 2026-11-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor