metanorma-plugin-lutaml 0.7.19 → 0.7.20

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d95bbbcc424c384a0c2d58374f647eda5e6efc60278c7a2e69b6eefec2e8b012
4
- data.tar.gz: 00b430d79891b1f9143186a3af2a5eddabe01c8f89f77431b494908164c67bcb
3
+ metadata.gz: 8c70ed413914e29f4c181d02bfd50681434437361fe26f10dc1ca94f7e85058e
4
+ data.tar.gz: addb2f7403c0ffebe85e26cd918440e140d43349c57055be8366b4d35cf794a9
5
5
  SHA512:
6
- metadata.gz: 2f07e00a438eb808adda1c72985a15e5fca581e2afeff305acc78164cf698ec6942c57da3863b767f2551ede925fc8b1eb804977665ff15d07204bb4bf637a60
7
- data.tar.gz: 9840d71a72679997ec0d6f9c11139c063a843cb1fa3f1920e7a770505d3357b026cde3e67270d8b216fefbeb0f6bfbd595b57e85007896490164f377ed27f2b3
6
+ metadata.gz: c5a5b0e871111297d907041d087a24acc58caf7f4c54db1f5213f6be08afdc5d26baceb50a34d9b0d806acd61d9316e72c0b051b7b5da5edfc0aad54ecc995f7
7
+ data.tar.gz: 61b0e6159c1444ea0faf3f3e693e3e2ef228aca57d2129a98450207dec0158e72459049462483a436ddc68e119624298c78d66ac161c2bc34a736b70ab765a96
@@ -177,9 +177,18 @@ index_names:, options:, indexes:)
177
177
  options: options.merge("document" => document),
178
178
  )
179
179
 
180
+ # Allow includes for the template
181
+ include_paths = [
182
+ Utils.relative_file_path(document, ""),
183
+ options["include_path"],
184
+ ].compact
185
+
180
186
  all_items.map do |item|
181
187
  repo_drop = item[:liquid_drop]
182
188
  template = ::Liquid::Template.parse(lines.join("\n"))
189
+ template.registers[:file_system] =
190
+ ::Metanorma::Plugin::Lutaml::Liquid::LocalFileSystem
191
+ .new(include_paths, ["%s.liquid", "_%s.liquid", "_%s.adoc"])
183
192
  template.assigns[context_name] = repo_drop
184
193
  template.render
185
194
  end.flatten
@@ -41,7 +41,7 @@ module Metanorma
41
41
 
42
42
  liquid_template.registers[:file_system] =
43
43
  ::Metanorma::Plugin::Lutaml::Liquid::LocalFileSystem
44
- .new(include_paths, ["_%s.liquid", "_%s.adoc"])
44
+ .new(include_paths, ["%s.liquid", "_%s.liquid", "_%s.adoc"])
45
45
 
46
46
  rendered_string = liquid_template
47
47
  .render(context_name => context_items,
@@ -1,7 +1,7 @@
1
1
  module Metanorma
2
2
  module Plugin
3
3
  module Lutaml
4
- VERSION = "0.7.19".freeze
4
+ VERSION = "0.7.20".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.19
4
+ version: 0.7.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-02-05 00:00:00.000000000 Z
11
+ date: 2025-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor