metanorma-plugin-lutaml 0.7.43 → 0.7.44
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/.rubocop_todo.yml +38 -68
- data/bin/console +1 -1
- data/lib/metanorma/plugin/lutaml/asciidoctor.rb +12 -0
- data/lib/metanorma/plugin/lutaml/base_preprocessor.rb +1 -3
- data/lib/metanorma/plugin/lutaml/base_structured_text_preprocessor.rb +0 -3
- data/lib/metanorma/plugin/lutaml/cache_store.rb +51 -0
- data/lib/metanorma/plugin/lutaml/config/package.rb +8 -0
- data/lib/metanorma/plugin/lutaml/config.rb +6 -5
- data/lib/metanorma/plugin/lutaml/content.rb +0 -2
- data/lib/metanorma/plugin/lutaml/data2_text_preprocessor.rb +0 -3
- data/lib/metanorma/plugin/lutaml/express_remarks_decorator.rb +1 -7
- data/lib/metanorma/plugin/lutaml/json2_text_preprocessor.rb +0 -3
- data/lib/metanorma/plugin/lutaml/liquid/custom_blocks.rb +14 -0
- data/lib/metanorma/plugin/lutaml/liquid/custom_filters/loadfile.rb +1 -1
- data/lib/metanorma/plugin/lutaml/liquid/custom_filters.rb +18 -0
- data/lib/metanorma/plugin/lutaml/liquid.rb +14 -0
- data/lib/metanorma/plugin/lutaml/lutaml_diagram_base.rb +1 -2
- data/lib/metanorma/plugin/lutaml/lutaml_diagram_block.rb +0 -2
- data/lib/metanorma/plugin/lutaml/lutaml_diagram_block_macro.rb +0 -2
- data/lib/metanorma/plugin/lutaml/lutaml_ea_diagram_block_macro.rb +0 -2
- data/lib/metanorma/plugin/lutaml/lutaml_ea_xmi_base.rb +5 -417
- data/lib/metanorma/plugin/lutaml/lutaml_ea_xmi_preprocessor.rb +0 -3
- data/lib/metanorma/plugin/lutaml/lutaml_gml_dictionary_base.rb +0 -2
- data/lib/metanorma/plugin/lutaml/lutaml_preprocessor.rb +27 -29
- data/lib/metanorma/plugin/lutaml/lutaml_uml_datamodel_description_preprocessor.rb +0 -3
- data/lib/metanorma/plugin/lutaml/lutaml_xmi_uml_preprocessor.rb +0 -3
- data/lib/metanorma/plugin/lutaml/lutaml_xsd_preprocessor.rb +4 -3
- data/lib/metanorma/plugin/lutaml/source_extractor.rb +0 -4
- data/lib/metanorma/plugin/lutaml/utils.rb +6 -10
- data/lib/metanorma/plugin/lutaml/version.rb +1 -1
- data/lib/metanorma/plugin/lutaml/xmi_cache.rb +148 -0
- data/lib/metanorma/plugin/lutaml/xmi_config.rb +34 -0
- data/lib/metanorma/plugin/lutaml/xmi_context_builder.rb +100 -0
- data/lib/metanorma/plugin/lutaml/xmi_package_filter.rb +71 -0
- data/lib/metanorma/plugin/lutaml/xmi_renderer.rb +100 -0
- data/lib/metanorma/plugin/lutaml/yaml2_text_preprocessor.rb +0 -3
- data/lib/metanorma/plugin/lutaml.rb +14 -0
- data/lib/metanorma-plugin-lutaml.rb +62 -21
- data/metanorma-plugin-lutaml.gemspec +1 -1
- metadata +12 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 546a03a5a7b95aaf58a96f398ce35c3985591d1c5ed092ed1d5988f4cbbf1226
|
|
4
|
+
data.tar.gz: b863f610a76a55b398f2f23e6a5405c89c8964b093481bbe51224de828e4e334
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 650ae721e094310b0a6a2797d674519927f2f8991ce4d1b5d772d4c8941bf48231d4107e1a0dff33194fb22d8046b895ed7237100ad245da2c2feb3a78c7970c
|
|
7
|
+
data.tar.gz: 2200b6ff0db0ca72f68087fb90d80d05917d00b0e78fd0f8114bb22d4d5e767857f0899b63281c8bff1427a00c20954e9844c5f6fc255c382bb7e342ee14c0b3
|
data/.rubocop_todo.yml
CHANGED
|
@@ -1,85 +1,77 @@
|
|
|
1
1
|
# This configuration was generated by
|
|
2
2
|
# `rubocop --auto-gen-config`
|
|
3
|
-
# on 2026-05-
|
|
3
|
+
# on 2026-05-14 10:29:29 UTC using RuboCop version 1.86.1.
|
|
4
4
|
# The point is for the user to remove these configuration records
|
|
5
5
|
# one by one as the offenses are removed from the code base.
|
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
|
8
8
|
|
|
9
|
-
# Offense count:
|
|
10
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
11
|
-
Gemspec/RequireMFA:
|
|
12
|
-
Exclude:
|
|
13
|
-
- 'metanorma-plugin-lutaml.gemspec'
|
|
14
|
-
|
|
15
|
-
# Offense count: 4
|
|
9
|
+
# Offense count: 2
|
|
16
10
|
# This cop supports safe autocorrection (--autocorrect).
|
|
17
|
-
# Configuration parameters: EnforcedStyle
|
|
18
|
-
# SupportedStyles:
|
|
19
|
-
Layout/
|
|
11
|
+
# Configuration parameters: EnforcedStyle.
|
|
12
|
+
# SupportedStyles: empty_lines, no_empty_lines
|
|
13
|
+
Layout/EmptyLinesAroundBlockBody:
|
|
20
14
|
Exclude:
|
|
21
|
-
- 'spec/
|
|
22
|
-
- 'spec/regen_expected_spec.rb'
|
|
15
|
+
- 'spec/metanorma/plugin/lutaml/lutaml_text_preprocessor_spec.rb'
|
|
23
16
|
|
|
24
17
|
# Offense count: 1
|
|
25
18
|
# This cop supports safe autocorrection (--autocorrect).
|
|
26
|
-
# Configuration parameters:
|
|
27
|
-
|
|
19
|
+
# Configuration parameters: Width, EnforcedStyleAlignWith, AllowedPatterns.
|
|
20
|
+
# SupportedStylesAlignWith: start_of_line, relative_to_receiver
|
|
21
|
+
Layout/IndentationWidth:
|
|
28
22
|
Exclude:
|
|
29
|
-
- '
|
|
23
|
+
- 'spec/metanorma/plugin/lutaml/lutaml_text_preprocessor_spec.rb'
|
|
30
24
|
|
|
31
|
-
# Offense count:
|
|
25
|
+
# Offense count: 5
|
|
32
26
|
# This cop supports safe autocorrection (--autocorrect).
|
|
33
|
-
|
|
27
|
+
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
|
28
|
+
# SupportedStyles: aligned, indented
|
|
29
|
+
Layout/LineEndStringConcatenationIndentation:
|
|
34
30
|
Exclude:
|
|
35
|
-
- 'spec/
|
|
31
|
+
- 'spec/metanorma/plugin/lutaml/express_remarks_decorator_spec.rb'
|
|
36
32
|
|
|
37
|
-
# Offense count:
|
|
33
|
+
# Offense count: 14
|
|
38
34
|
# This cop supports safe autocorrection (--autocorrect).
|
|
39
35
|
# Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
|
|
40
36
|
# URISchemes: http, https
|
|
41
37
|
Layout/LineLength:
|
|
42
38
|
Exclude:
|
|
43
39
|
- 'Rakefile'
|
|
44
|
-
- 'lib/metanorma/plugin/lutaml/base_preprocessor.rb'
|
|
45
|
-
- 'lib/metanorma/plugin/lutaml/lutaml_ea_xmi_base.rb'
|
|
46
40
|
- 'lib/metanorma/plugin/lutaml/utils.rb'
|
|
41
|
+
- 'spec/metanorma/plugin/lutaml/express_remarks_decorator_spec.rb'
|
|
42
|
+
- 'spec/metanorma/plugin/lutaml/lutaml_text_preprocessor_spec.rb'
|
|
47
43
|
- 'spec/metanorma/plugin/lutaml/lutaml_uml_datamodel_description_preprocessor_spec.rb'
|
|
48
44
|
- 'spec/metanorma/plugin/lutaml/lutaml_xsd_preprocessor_spec.rb'
|
|
49
|
-
- 'spec/
|
|
50
|
-
- 'spec/
|
|
45
|
+
- 'spec/metanorma/plugin/lutaml/macros_data2text_spec.rb'
|
|
46
|
+
- 'spec/metanorma/plugin/lutaml/macros_json2text_spec.rb'
|
|
47
|
+
- 'spec/metanorma/plugin/lutaml/macros_yaml2text_spec.rb'
|
|
48
|
+
- 'spec/metanorma/plugin/lutaml/source_extractor_spec.rb'
|
|
51
49
|
- 'spec/support/shared_examples/structured_data_2_text_preprocessor.rb'
|
|
52
50
|
|
|
53
|
-
# Offense count:
|
|
51
|
+
# Offense count: 1
|
|
54
52
|
# This cop supports safe autocorrection (--autocorrect).
|
|
55
|
-
|
|
56
|
-
# SupportedStyles: final_newline, final_blank_line
|
|
57
|
-
Layout/TrailingEmptyLines:
|
|
53
|
+
Layout/RescueEnsureAlignment:
|
|
58
54
|
Exclude:
|
|
59
|
-
- '
|
|
60
|
-
- 'spec/regen_expected.rb'
|
|
55
|
+
- 'spec/metanorma/plugin/lutaml/lutaml_text_preprocessor_spec.rb'
|
|
61
56
|
|
|
62
|
-
# Offense count:
|
|
57
|
+
# Offense count: 2
|
|
63
58
|
# This cop supports safe autocorrection (--autocorrect).
|
|
64
59
|
# Configuration parameters: AllowInHeredoc.
|
|
65
60
|
Layout/TrailingWhitespace:
|
|
66
61
|
Exclude:
|
|
67
|
-
- '
|
|
68
|
-
- 'spec/regen_expected.rb'
|
|
69
|
-
- 'spec/regen_expected_spec.rb'
|
|
62
|
+
- 'spec/metanorma/plugin/lutaml/lutaml_text_preprocessor_spec.rb'
|
|
70
63
|
|
|
71
|
-
# Offense count:
|
|
64
|
+
# Offense count: 3
|
|
72
65
|
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
|
|
73
66
|
Metrics/AbcSize:
|
|
74
67
|
Exclude:
|
|
75
68
|
- 'lib/metanorma/plugin/lutaml/lutaml_xsd_preprocessor.rb'
|
|
76
69
|
- 'lib/metanorma/plugin/lutaml/utils.rb'
|
|
77
70
|
|
|
78
|
-
# Offense count:
|
|
71
|
+
# Offense count: 1
|
|
79
72
|
# Configuration parameters: AllowedMethods, AllowedPatterns, Max.
|
|
80
73
|
Metrics/CyclomaticComplexity:
|
|
81
74
|
Exclude:
|
|
82
|
-
- 'lib/metanorma/plugin/lutaml/lutaml_ea_xmi_base.rb'
|
|
83
75
|
- 'lib/metanorma/plugin/lutaml/utils.rb'
|
|
84
76
|
|
|
85
77
|
# Offense count: 7
|
|
@@ -87,11 +79,10 @@ Metrics/CyclomaticComplexity:
|
|
|
87
79
|
Metrics/MethodLength:
|
|
88
80
|
Max: 19
|
|
89
81
|
|
|
90
|
-
# Offense count:
|
|
82
|
+
# Offense count: 1
|
|
91
83
|
# Configuration parameters: AllowedMethods, AllowedPatterns, Max.
|
|
92
84
|
Metrics/PerceivedComplexity:
|
|
93
85
|
Exclude:
|
|
94
|
-
- 'lib/metanorma/plugin/lutaml/lutaml_ea_xmi_base.rb'
|
|
95
86
|
- 'lib/metanorma/plugin/lutaml/utils.rb'
|
|
96
87
|
|
|
97
88
|
# Offense count: 1
|
|
@@ -127,16 +118,10 @@ RSpec/ContextWording:
|
|
|
127
118
|
- 'spec/metanorma/plugin/lutaml/macros_data2text_spec.rb'
|
|
128
119
|
- 'spec/support/shared_examples/structured_data_2_text_preprocessor.rb'
|
|
129
120
|
|
|
130
|
-
# Offense count:
|
|
131
|
-
# Configuration parameters: IgnoredMetadata.
|
|
132
|
-
RSpec/DescribeClass:
|
|
133
|
-
Exclude:
|
|
134
|
-
- 'spec/regen_expected_spec.rb'
|
|
135
|
-
|
|
136
|
-
# Offense count: 40
|
|
121
|
+
# Offense count: 44
|
|
137
122
|
# Configuration parameters: CountAsOne.
|
|
138
123
|
RSpec/ExampleLength:
|
|
139
|
-
Max:
|
|
124
|
+
Max: 26
|
|
140
125
|
|
|
141
126
|
# Offense count: 13
|
|
142
127
|
# Configuration parameters: Max, AllowedIdentifiers, AllowedPatterns.
|
|
@@ -161,7 +146,7 @@ RSpec/LeakyLocalVariable:
|
|
|
161
146
|
- 'spec/metanorma/plugin/lutaml/lutaml_uml_datamodel_description_preprocessor_spec.rb'
|
|
162
147
|
- 'spec/metanorma/plugin/lutaml/lutaml_xmi_index_spec.rb'
|
|
163
148
|
|
|
164
|
-
# Offense count:
|
|
149
|
+
# Offense count: 21
|
|
165
150
|
RSpec/MultipleExpectations:
|
|
166
151
|
Max: 6
|
|
167
152
|
|
|
@@ -188,17 +173,6 @@ RSpec/NamedSubject:
|
|
|
188
173
|
RSpec/NestedGroups:
|
|
189
174
|
Max: 7
|
|
190
175
|
|
|
191
|
-
# Offense count: 3
|
|
192
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
193
|
-
RSpec/Output:
|
|
194
|
-
Exclude:
|
|
195
|
-
- 'spec/regen_expected.rb'
|
|
196
|
-
|
|
197
|
-
# Offense count: 1
|
|
198
|
-
RSpec/PendingWithoutReason:
|
|
199
|
-
Exclude:
|
|
200
|
-
- 'spec/metanorma/plugin/lutaml/lutaml_text_preprocessor_spec.rb'
|
|
201
|
-
|
|
202
176
|
# Offense count: 2
|
|
203
177
|
RSpec/RepeatedExampleGroupBody:
|
|
204
178
|
Exclude:
|
|
@@ -223,16 +197,12 @@ RSpec/SubjectDeclaration:
|
|
|
223
197
|
|
|
224
198
|
# Offense count: 1
|
|
225
199
|
# This cop supports safe autocorrection (--autocorrect).
|
|
226
|
-
|
|
227
|
-
# SupportedStyles: single_quotes, double_quotes
|
|
228
|
-
Style/StringLiterals:
|
|
200
|
+
Style/RedundantBegin:
|
|
229
201
|
Exclude:
|
|
230
|
-
- 'metanorma
|
|
202
|
+
- 'spec/metanorma/plugin/lutaml/lutaml_text_preprocessor_spec.rb'
|
|
231
203
|
|
|
232
|
-
# Offense count:
|
|
204
|
+
# Offense count: 2
|
|
233
205
|
# This cop supports safe autocorrection (--autocorrect).
|
|
234
|
-
|
|
235
|
-
# SupportedStyles: single_quotes, double_quotes
|
|
236
|
-
Style/StringLiteralsInInterpolation:
|
|
206
|
+
Style/RedundantConstantBase:
|
|
237
207
|
Exclude:
|
|
238
|
-
- 'spec/metanorma/plugin/lutaml/
|
|
208
|
+
- 'spec/metanorma/plugin/lutaml/lutaml_text_preprocessor_spec.rb'
|
data/bin/console
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
2
|
|
|
3
3
|
require "bundler/setup"
|
|
4
|
-
|
|
4
|
+
require_relative "../lib/metanorma-plugin-lutaml"
|
|
5
5
|
|
|
6
6
|
# You can add fixtures and/or initialization code here to make experimenting
|
|
7
7
|
# with your gem easier. You can also use a different console, if you like.
|
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
require "liquid"
|
|
4
4
|
require "asciidoctor"
|
|
5
5
|
require "asciidoctor/reader"
|
|
6
|
-
require "metanorma/plugin/lutaml/utils"
|
|
7
|
-
require "metanorma/plugin/lutaml/asciidoctor/preprocessor"
|
|
8
6
|
|
|
9
7
|
module Metanorma
|
|
10
8
|
module Plugin
|
|
@@ -173,7 +171,7 @@ module Metanorma
|
|
|
173
171
|
)
|
|
174
172
|
parsed_template.assigns["schemas_order"] =
|
|
175
173
|
options["selected_schemas"]
|
|
176
|
-
parsed_template.render
|
|
174
|
+
parsed_template.render.split("\n", -1)
|
|
177
175
|
end.flatten
|
|
178
176
|
rescue StandardError => e
|
|
179
177
|
::Metanorma::Util.log(
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Metanorma
|
|
4
|
+
module Plugin
|
|
5
|
+
module Lutaml
|
|
6
|
+
class CacheStore
|
|
7
|
+
def initialize(max_size: 50)
|
|
8
|
+
@store = {}
|
|
9
|
+
@max_size = max_size
|
|
10
|
+
@mutex = Mutex.new
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def fetch(key)
|
|
14
|
+
@mutex.synchronize { @store[key] }
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def store(key, value)
|
|
18
|
+
@mutex.synchronize do
|
|
19
|
+
evict! if @store.size >= @max_size
|
|
20
|
+
@store[key] = value
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def fetch_or_store(key)
|
|
25
|
+
@mutex.synchronize do
|
|
26
|
+
if @store.key?(key)
|
|
27
|
+
@store[key]
|
|
28
|
+
else
|
|
29
|
+
evict! if @store.size >= @max_size
|
|
30
|
+
@store[key] = yield
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def clear
|
|
36
|
+
@mutex.synchronize { @store.clear }
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def size
|
|
40
|
+
@mutex.synchronize { @store.size }
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
private
|
|
44
|
+
|
|
45
|
+
def evict!
|
|
46
|
+
@store.shift
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
@@ -14,6 +14,14 @@ module Metanorma
|
|
|
14
14
|
map "skip_tables", to: :skip_tables
|
|
15
15
|
map "render_entities", to: :render_entities
|
|
16
16
|
end
|
|
17
|
+
|
|
18
|
+
def collection_for(key)
|
|
19
|
+
case key
|
|
20
|
+
when "render_entities" then render_entities
|
|
21
|
+
when "skip_tables" then skip_tables
|
|
22
|
+
else raise ArgumentError, "Unknown collection key: #{key}"
|
|
23
|
+
end
|
|
24
|
+
end
|
|
17
25
|
end
|
|
18
26
|
end
|
|
19
27
|
end
|
|
@@ -3,16 +3,17 @@
|
|
|
3
3
|
require "yaml"
|
|
4
4
|
require "lutaml"
|
|
5
5
|
require "lutaml/model"
|
|
6
|
-
require_relative "config/package"
|
|
7
|
-
require_relative "config/root"
|
|
8
|
-
require_relative "config/guidance_attribute"
|
|
9
|
-
require_relative "config/guidance_klass"
|
|
10
|
-
require_relative "config/guidance"
|
|
11
6
|
|
|
12
7
|
module Metanorma
|
|
13
8
|
module Plugin
|
|
14
9
|
module Lutaml
|
|
15
10
|
module Config
|
|
11
|
+
autoload :Guidance, "metanorma/plugin/lutaml/config/guidance"
|
|
12
|
+
autoload :GuidanceAttribute,
|
|
13
|
+
"metanorma/plugin/lutaml/config/guidance_attribute"
|
|
14
|
+
autoload :GuidanceKlass, "metanorma/plugin/lutaml/config/guidance_klass"
|
|
15
|
+
autoload :Package, "metanorma/plugin/lutaml/config/package"
|
|
16
|
+
autoload :Root, "metanorma/plugin/lutaml/config/root"
|
|
16
17
|
end
|
|
17
18
|
end
|
|
18
19
|
end
|
|
@@ -55,13 +55,7 @@ module Metanorma
|
|
|
55
55
|
|
|
56
56
|
def prefix_relative_paths(line, path_prefix)
|
|
57
57
|
line.gsub(RELATIVE_PREFIX_MACRO_REGEXP) do |_match|
|
|
58
|
-
|
|
59
|
-
# Transform relative path (../path/to/file) into the absolute path
|
|
60
|
-
# because `image::` macro wont understand it other way
|
|
61
|
-
if prefixed_path.start_with?("../")
|
|
62
|
-
prefixed_path = File.absolute_path(prefixed_path)
|
|
63
|
-
end
|
|
64
|
-
full_path = File.expand_path(prefixed_path)
|
|
58
|
+
full_path = File.expand_path(File.join(path_prefix, $3.strip))
|
|
65
59
|
"#{$1}#{$2}#{full_path}#{$4}"
|
|
66
60
|
end
|
|
67
61
|
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Metanorma
|
|
4
|
+
module Plugin
|
|
5
|
+
module Lutaml
|
|
6
|
+
module Liquid
|
|
7
|
+
module CustomFilters
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
require_relative "custom_filters/html2adoc"
|
|
15
|
+
require_relative "custom_filters/values"
|
|
16
|
+
require_relative "custom_filters/replace_regex"
|
|
17
|
+
require_relative "custom_filters/loadfile"
|
|
18
|
+
require_relative "custom_filters/file_exist"
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Metanorma
|
|
4
|
+
module Plugin
|
|
5
|
+
module Lutaml
|
|
6
|
+
module Liquid
|
|
7
|
+
autoload :CustomBlocks, "metanorma/plugin/lutaml/liquid/custom_blocks"
|
|
8
|
+
autoload :CustomFilters, "metanorma/plugin/lutaml/liquid/custom_filters"
|
|
9
|
+
autoload :LocalFileSystem,
|
|
10
|
+
"metanorma/plugin/lutaml/liquid/multiply_local_file_system"
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -6,7 +6,6 @@ require "asciidoctor/reader"
|
|
|
6
6
|
require "lutaml"
|
|
7
7
|
require "lutaml/uml"
|
|
8
8
|
require "lutaml/formatter"
|
|
9
|
-
require "metanorma/plugin/lutaml/utils"
|
|
10
9
|
|
|
11
10
|
module Metanorma
|
|
12
11
|
module Plugin
|
|
@@ -33,7 +32,7 @@ module Metanorma
|
|
|
33
32
|
def abort(parent, reader, attrs, msg)
|
|
34
33
|
warn(msg)
|
|
35
34
|
attrs["language"] = "lutaml"
|
|
36
|
-
source = reader.
|
|
35
|
+
source = reader.is_a?(::Asciidoctor::Reader) ? reader.source : reader
|
|
37
36
|
create_listing_block(
|
|
38
37
|
parent,
|
|
39
38
|
source,
|