metanorma 2.0.6 → 2.0.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -14,15 +14,16 @@ module Metanorma
14
14
  end
15
15
 
16
16
  def extract_metanorma_options(file)
17
- headerextract = file.sub(/\n\n.*$/m, "\n")
18
- /\n:mn-document-class:\s+(?<type>\S[^\n]*)\n/ =~ headerextract
19
- /\n:mn-output-extensions:\s+(?<extensions>\S[^\n]*)\n/ =~ headerextract
20
- /\n:mn-relaton-output-file:\s+(?<relaton>\S[^\n]*)\n/ =~ headerextract
21
- /\n(?<asciimath>:mn-keep-asciimath:[^\n]*)\n/ =~ headerextract
22
- /\n(?<novalid>:novalid:[^\n]*)\n/ =~ headerextract
23
- asciimath = if defined?(asciimath)
24
- !asciimath.nil? && asciimath != ":mn-keep-asciimath: false"
25
- end
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.gsub("-", "").sub(/override$/, "_override").sub(/pdf$/, "_pdf")
66
+ name.delete("-").sub(/override$/, "_override").sub(/pdf$/, "_pdf")
66
67
  .to_sym
67
68
  end
68
69
 
@@ -1,3 +1,3 @@
1
1
  module Metanorma
2
- VERSION = "2.0.6".freeze
2
+ VERSION = "2.0.9".freeze
3
3
  end
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.6.3"
30
- spec.add_runtime_dependency "mn2pdf", "~> 1"
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.6
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-10-14 00:00:00.000000000 Z
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.6.3
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.6.3
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: '1'
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: '1'
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
@@ -1,15 +0,0 @@
1
- module Shale
2
- module Adapter
3
- module Nokogiri
4
- class Node
5
- def content
6
- @node
7
- end
8
-
9
- def to_xml
10
- @node.to_xml
11
- end
12
- end
13
- end
14
- end
15
- end