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 +4 -4
- data/lib/metanorma/core/version.rb +1 -1
- data/lib/metanorma/input/asciidoc.rb +11 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b063c41558221ddf0a4597a01e5b71ebbeb22f41138bbc3f48f626e33388b460
|
|
4
|
+
data.tar.gz: d6d64bcbccc4cf0910c7c9d89eadad251b1b8fb7dbfb4e6e9fd4b7e124575e7c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bf69480d979cd4c2ce1d517175ba1197d837dd814d327feff678253a63027a1eb87e06928e91fa8d56ad2596b72ae4f09d544d10bc827d4a440d02bacdf056f3
|
|
7
|
+
data.tar.gz: 4a807ecb5b3c84ff1d9866f5b96ae6fecf434f4bf4bd4f0ece488882f31db4fd43b2baf34dedb713161b58122cbac2544b05b2182ebdca1d2d8687ff2b017e8e
|
|
@@ -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.
|
|
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-
|
|
11
|
+
date: 2026-11-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: asciidoctor
|