metanorma 2.0.6 → 2.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/metanorma/collection/collection.rb +19 -6
- data/lib/metanorma/collection/config/bibdata.rb +2 -2
- data/lib/metanorma/collection/config/compile_options.rb +4 -5
- data/lib/metanorma/collection/config/config.rb +42 -73
- data/lib/metanorma/collection/config/converters.rb +27 -1
- data/lib/metanorma/collection/config/directive.rb +9 -3
- data/lib/metanorma/collection/config/manifest.rb +33 -26
- data/lib/metanorma/collection/filelookup/filelookup.rb +20 -8
- data/lib/metanorma/collection/filelookup/filelookup_sectionsplit.rb +40 -16
- data/lib/metanorma/collection/manifest/manifest.rb +1 -1
- data/lib/metanorma/collection/renderer/fileparse.rb +94 -121
- data/lib/metanorma/collection/renderer/navigation.rb +1 -1
- data/lib/metanorma/collection/renderer/renderer.rb +4 -1
- data/lib/metanorma/collection/renderer/svg.rb +44 -0
- data/lib/metanorma/collection/renderer/utils.rb +18 -10
- data/lib/metanorma/collection/sectionsplit/collection.rb +6 -6
- data/lib/metanorma/collection/sectionsplit/sectionsplit.rb +52 -13
- data/lib/metanorma/collection/util/util.rb +17 -3
- data/lib/metanorma/compile/compile.rb +8 -0
- data/lib/metanorma/compile/extract.rb +2 -4
- data/lib/metanorma/input/asciidoc.rb +11 -10
- data/lib/metanorma/version.rb +1 -1
- data/metanorma.gemspec +3 -3
- metadata +21 -21
- data/lib/metanorma/shale_monkeypatch.rb +0 -15
@@ -14,15 +14,16 @@ module Metanorma
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def extract_metanorma_options(file)
|
17
|
-
|
18
|
-
/\n:mn-document-class:\s+(?<type>\S[^\n]*)\n/ =~
|
19
|
-
/\n:mn-output-extensions:\s+(?<extensions>\S[^\n]*)\n/ =~
|
20
|
-
/\n:mn-relaton-output-file:\s+(?<relaton>\S[^\n]*)\n/ =~
|
21
|
-
/\n(?<asciimath>:mn-keep-asciimath:[^\n]*)\n/ =~
|
22
|
-
/\n(?<novalid>:novalid:[^\n]*)\n/ =~
|
23
|
-
|
24
|
-
|
25
|
-
|
17
|
+
hdr = file.sub(/\n\n.*$/m, "\n")
|
18
|
+
/\n:(?:mn-)?(?:document-class|flavor):\s+(?<type>\S[^\n]*)\n/ =~ hdr
|
19
|
+
/\n:(?:mn-)?output-extensions:\s+(?<extensions>\S[^\n]*)\n/ =~ hdr
|
20
|
+
/\n:(?:mn-)?relaton-output-file:\s+(?<relaton>\S[^\n]*)\n/ =~ hdr
|
21
|
+
/\n(?<asciimath>:(?:mn-)?keep-asciimath:[^\n]*)\n/ =~ hdr
|
22
|
+
/\n(?<novalid>:novalid:[^\n]*)\n/ =~ hdr
|
23
|
+
if defined?(asciimath)
|
24
|
+
asciimath =
|
25
|
+
!asciimath.nil? && !/keep-asciimath: false/.match?(asciimath)
|
26
|
+
end
|
26
27
|
asciimath = nil if asciimath == false
|
27
28
|
{
|
28
29
|
type: defined?(type) ? type&.strip : nil,
|
@@ -62,7 +63,7 @@ module Metanorma
|
|
62
63
|
toc-tables toc-recommendations).freeze
|
63
64
|
|
64
65
|
def attr_name_normalise(name)
|
65
|
-
name.
|
66
|
+
name.delete("-").sub(/override$/, "_override").sub(/pdf$/, "_pdf")
|
66
67
|
.to_sym
|
67
68
|
end
|
68
69
|
|
data/lib/metanorma/version.rb
CHANGED
data/metanorma.gemspec
CHANGED
@@ -24,12 +24,12 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.required_ruby_version = ">= 3.1.0"
|
25
25
|
|
26
26
|
spec.add_runtime_dependency "asciidoctor"
|
27
|
+
spec.add_runtime_dependency "concurrent-ruby"
|
27
28
|
spec.add_runtime_dependency "fontist", ">= 1.14.3"
|
28
29
|
spec.add_runtime_dependency "htmlentities"
|
29
|
-
spec.add_runtime_dependency "isodoc", ">= 2.
|
30
|
-
spec.add_runtime_dependency "mn2pdf", "~>
|
30
|
+
spec.add_runtime_dependency "isodoc", ">= 2.12.2"
|
31
|
+
spec.add_runtime_dependency "mn2pdf", "~> 2"
|
31
32
|
spec.add_runtime_dependency "nokogiri"
|
32
|
-
spec.add_runtime_dependency "shale"
|
33
33
|
|
34
34
|
# get relaton-cli to avoid circular reference with metanorma-standoc
|
35
35
|
# spec.add_dependency "relaton-cli"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-12-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: asciidoctor
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: concurrent-ruby
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: fontist
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,28 +72,28 @@ dependencies:
|
|
58
72
|
requirements:
|
59
73
|
- - ">="
|
60
74
|
- !ruby/object:Gem::Version
|
61
|
-
version: 2.
|
75
|
+
version: 2.12.2
|
62
76
|
type: :runtime
|
63
77
|
prerelease: false
|
64
78
|
version_requirements: !ruby/object:Gem::Requirement
|
65
79
|
requirements:
|
66
80
|
- - ">="
|
67
81
|
- !ruby/object:Gem::Version
|
68
|
-
version: 2.
|
82
|
+
version: 2.12.2
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
84
|
name: mn2pdf
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
72
86
|
requirements:
|
73
87
|
- - "~>"
|
74
88
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
89
|
+
version: '2'
|
76
90
|
type: :runtime
|
77
91
|
prerelease: false
|
78
92
|
version_requirements: !ruby/object:Gem::Requirement
|
79
93
|
requirements:
|
80
94
|
- - "~>"
|
81
95
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
96
|
+
version: '2'
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
98
|
name: nokogiri
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -94,20 +108,6 @@ dependencies:
|
|
94
108
|
- - ">="
|
95
109
|
- !ruby/object:Gem::Version
|
96
110
|
version: '0'
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: shale
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - ">="
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: '0'
|
104
|
-
type: :runtime
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - ">="
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: debug
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -316,6 +316,7 @@ files:
|
|
316
316
|
- lib/metanorma/collection/renderer/navigation.rb
|
317
317
|
- lib/metanorma/collection/renderer/render_word.rb
|
318
318
|
- lib/metanorma/collection/renderer/renderer.rb
|
319
|
+
- lib/metanorma/collection/renderer/svg.rb
|
319
320
|
- lib/metanorma/collection/renderer/utils.rb
|
320
321
|
- lib/metanorma/collection/sectionsplit/collection.rb
|
321
322
|
- lib/metanorma/collection/sectionsplit/sectionsplit.rb
|
@@ -333,7 +334,6 @@ files:
|
|
333
334
|
- lib/metanorma/processor.rb
|
334
335
|
- lib/metanorma/processor/processor.rb
|
335
336
|
- lib/metanorma/registry/registry.rb
|
336
|
-
- lib/metanorma/shale_monkeypatch.rb
|
337
337
|
- lib/metanorma/util/fontist_helper.rb
|
338
338
|
- lib/metanorma/util/util.rb
|
339
339
|
- lib/metanorma/util/worker_pool.rb
|