metanorma-plugin-lutaml 0.7.5 → 0.7.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/metanorma/plugin/lutaml/liquid/custom_filters.rb +2 -2
- data/lib/metanorma/plugin/lutaml/lutaml_gml_dictionary_block_macro.rb +3 -1
- data/lib/metanorma/plugin/lutaml/lutaml_preprocessor.rb +5 -2
- data/lib/metanorma/plugin/lutaml/utils.rb +10 -4
- data/lib/metanorma/plugin/lutaml/version.rb +1 -1
- data/metanorma-plugin-lutaml.gemspec +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d59529d97e0b2a61af4daf695ab6e3490ccdb5e99f5a351e53ab8c822c063a17
|
4
|
+
data.tar.gz: 2a30e8db498027922dc4f848057880a13d4a240310b2c01122ed2176be4cbf2e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e5b8fffe0ec8df9e9ae6bddff29202f9c65a40b43a4790980799763cad78f950cab5c59f0b07ac6c7e774f4199f9aa5cf9c9ec2470d4d67622d3e491416de09e
|
7
|
+
data.tar.gz: c530eea53a62605af3df803eeddffdb5feee15e91856dff2541fe2b5831cd5e27ad5052fab01d101763eb9a890b0154aad28a934a40caf980111d2647eda5448
|
@@ -1,5 +1,5 @@
|
|
1
1
|
require "coradoc"
|
2
|
-
require "coradoc/
|
2
|
+
require "coradoc/input/html"
|
3
3
|
|
4
4
|
module Metanorma
|
5
5
|
module Plugin
|
@@ -7,7 +7,7 @@ module Metanorma
|
|
7
7
|
module Liquid
|
8
8
|
module CustomFilters
|
9
9
|
def html2adoc(input)
|
10
|
-
Coradoc::
|
10
|
+
Coradoc::Input::HTML.convert(input)
|
11
11
|
end
|
12
12
|
|
13
13
|
def interpolate(input)
|
@@ -21,7 +21,9 @@ module Metanorma
|
|
21
21
|
|
22
22
|
def gml_dictionary_template(document, template_path)
|
23
23
|
if template_path.nil?
|
24
|
-
|
24
|
+
::Metanorma::Util.log(
|
25
|
+
"[lutaml_gml_dictionary] Error: Template not found!", :error
|
26
|
+
)
|
25
27
|
end
|
26
28
|
|
27
29
|
rel_tmpl_path = Utils.relative_file_path(
|
@@ -229,9 +229,12 @@ module Metanorma
|
|
229
229
|
)
|
230
230
|
end.flatten
|
231
231
|
rescue StandardError => e
|
232
|
+
::Metanorma::Util.log(
|
233
|
+
"[LutamlPreprocessor] Failed to parse LutaML block: #{e.message}",
|
234
|
+
:error,
|
235
|
+
)
|
236
|
+
# [] # Return empty array to avoid breaking the document
|
232
237
|
raise e
|
233
|
-
document.logger.warn("Failed to parse LutaML block: #{e.message}")
|
234
|
-
[]
|
235
238
|
end
|
236
239
|
|
237
240
|
def parse_options(options_string)
|
@@ -48,9 +48,11 @@ module Metanorma
|
|
48
48
|
|
49
49
|
def notify_render_errors(document, errors)
|
50
50
|
errors.each do |error_obj|
|
51
|
-
|
52
|
-
|
53
|
-
|
51
|
+
::Metanorma::Util.log(
|
52
|
+
"[metanorma-plugin-lutaml] Liquid render error: " \
|
53
|
+
"#{error_obj.message}",
|
54
|
+
:error,
|
55
|
+
)
|
54
56
|
end
|
55
57
|
end
|
56
58
|
|
@@ -87,7 +89,11 @@ module Metanorma
|
|
87
89
|
force_read: true,
|
88
90
|
)
|
89
91
|
rescue StandardError => e
|
90
|
-
|
92
|
+
::Metanorma::Util.log(
|
93
|
+
"[metanorma-plugin-lutaml] Failed to load " \
|
94
|
+
"#{full_path}: #{e.message}",
|
95
|
+
:error,
|
96
|
+
)
|
91
97
|
raise e
|
92
98
|
# nil
|
93
99
|
end
|
@@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
|
|
26
26
|
spec.require_paths = ["lib"]
|
27
27
|
|
28
28
|
spec.add_dependency "asciidoctor"
|
29
|
-
spec.add_dependency "coradoc"
|
29
|
+
spec.add_dependency "coradoc", "~> 1.1.1"
|
30
30
|
spec.add_dependency "expressir", "~> 1.4.0"
|
31
31
|
spec.add_dependency "liquid"
|
32
32
|
spec.add_dependency "lutaml", ">= 0.9.4"
|
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.
|
4
|
+
version: 0.7.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: asciidoctor
|
@@ -28,16 +28,16 @@ dependencies:
|
|
28
28
|
name: coradoc
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 1.1.1
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 1.1.1
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: expressir
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|