metanorma-standoc 2.8.11 → 2.9.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +1 -1
  3. data/lib/metanorma/standoc/anchor.rb +3 -3
  4. data/lib/metanorma/standoc/base.rb +1 -1
  5. data/lib/metanorma/standoc/blocks.rb +5 -5
  6. data/lib/metanorma/standoc/blocks_image.rb +1 -1
  7. data/lib/metanorma/standoc/blocks_notes.rb +6 -6
  8. data/lib/metanorma/standoc/cleanup.rb +15 -0
  9. data/lib/metanorma/standoc/cleanup_block.rb +1 -1
  10. data/lib/metanorma/standoc/cleanup_boilerplate.rb +67 -31
  11. data/lib/metanorma/standoc/cleanup_maths.rb +24 -1
  12. data/lib/metanorma/standoc/cleanup_ref.rb +0 -1
  13. data/lib/metanorma/standoc/cleanup_section.rb +5 -9
  14. data/lib/metanorma/standoc/cleanup_section_names.rb +5 -5
  15. data/lib/metanorma/standoc/cleanup_terms.rb +6 -5
  16. data/lib/metanorma/standoc/cleanup_xref.rb +6 -10
  17. data/lib/metanorma/standoc/converter.rb +1 -0
  18. data/lib/metanorma/standoc/init.rb +23 -2
  19. data/lib/metanorma/standoc/inline.rb +5 -5
  20. data/lib/metanorma/standoc/isodoc.rng +5 -5
  21. data/lib/metanorma/standoc/lists.rb +4 -4
  22. data/lib/metanorma/standoc/macros.rb +16 -44
  23. data/lib/metanorma/standoc/macros_embed.rb +14 -12
  24. data/lib/metanorma/standoc/macros_inline.rb +38 -75
  25. data/lib/metanorma/standoc/macros_link.rb +81 -0
  26. data/lib/metanorma/standoc/ref.rb +9 -12
  27. data/lib/metanorma/standoc/ref_queue.rb +2 -4
  28. data/lib/metanorma/standoc/ref_utility.rb +2 -2
  29. data/lib/metanorma/standoc/section.rb +3 -3
  30. data/lib/metanorma/standoc/terms.rb +2 -2
  31. data/lib/metanorma/standoc/utils.rb +22 -2
  32. data/lib/metanorma/standoc/validate.rb +14 -2
  33. data/lib/metanorma/standoc/validate_table.rb +7 -0
  34. data/lib/metanorma/standoc/version.rb +1 -1
  35. data/metanorma-standoc.gemspec +5 -4
  36. metadata +24 -9
@@ -2,6 +2,7 @@ module Metanorma
2
2
  module Standoc
3
3
  module Validate
4
4
  def table_validate(doc)
5
+ empty_table_validate(doc)
5
6
  doc.xpath("//table[colgroup]").each do |t|
6
7
  maxrowcols_validate(t, t.xpath("./colgroup/col").size)
7
8
  end
@@ -13,6 +14,12 @@ module Metanorma
13
14
  end
14
15
  end
15
16
 
17
+ def empty_table_validate(doc)
18
+ doc.xpath("//table[not(.//tr)]").each do |t|
19
+ @log.add("Table", t, "Empty table", severity: 0)
20
+ end
21
+ end
22
+
16
23
  def max_td_count(table)
17
24
  max = 0
18
25
  table.xpath("./tr").each do |tr|
@@ -19,6 +19,6 @@ module Metanorma
19
19
  end
20
20
 
21
21
  module Standoc
22
- VERSION = "2.8.11".freeze
22
+ VERSION = "2.9.1".freeze
23
23
  end
24
24
  end
@@ -26,23 +26,24 @@ Gem::Specification.new do |spec|
26
26
  f.match(%r{^(test|spec|features|bin|.github)/}) \
27
27
  || f.match(%r{Rakefile|bin/rspec})
28
28
  end
29
- spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
29
+ spec.required_ruby_version = Gem::Requirement.new(">= 3.1.0")
30
30
 
31
31
  spec.add_dependency "addressable", "~> 2.8.0"
32
32
  spec.add_dependency "asciidoctor", "~> 2.0.0"
33
33
  spec.add_dependency "crass", "~> 1.0.0"
34
34
  spec.add_dependency "iev", "~> 0.3.0"
35
- spec.add_dependency "isodoc", "~> 2.10.2"
35
+ spec.add_dependency "isodoc", "~> 2.10.5"
36
36
  spec.add_dependency "metanorma", ">= 1.6.0"
37
37
  spec.add_dependency "metanorma-plugin-datastruct", "~> 0.3.0"
38
38
  spec.add_dependency "metanorma-plugin-glossarist", "~> 0.2.0"
39
- spec.add_dependency "metanorma-plugin-lutaml", "~> 0.6.0"
39
+ spec.add_dependency "metanorma-plugin-lutaml", "~> 0.7.0"
40
+ spec.add_dependency "metanorma-utils", "~> 1.9.0"
40
41
  spec.add_dependency "ruby-jing"
41
42
  # relaton-cli not just relaton, to avoid circular reference in metanorma
42
43
  spec.add_dependency "asciimath2unitsml", "~> 0.4.0"
43
44
  spec.add_dependency "concurrent-ruby"
44
45
  spec.add_dependency "pngcheck"
45
- spec.add_dependency "relaton-cli", "~> 1.18.1"
46
+ spec.add_dependency "relaton-cli", "~> 1.19.0"
46
47
  spec.add_dependency "relaton-iev", "~> 1.2.0"
47
48
  spec.add_dependency "unicode2latex", "~> 0.0.1"
48
49
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-standoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.11
4
+ version: 2.9.1
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-06-17 00:00:00.000000000 Z
11
+ date: 2024-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 2.10.2
75
+ version: 2.10.5
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 2.10.2
82
+ version: 2.10.5
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: metanorma
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -128,14 +128,28 @@ dependencies:
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: 0.6.0
131
+ version: 0.7.0
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: 0.6.0
138
+ version: 0.7.0
139
+ - !ruby/object:Gem::Dependency
140
+ name: metanorma-utils
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: 1.9.0
146
+ type: :runtime
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: 1.9.0
139
153
  - !ruby/object:Gem::Dependency
140
154
  name: ruby-jing
141
155
  requirement: !ruby/object:Gem::Requirement
@@ -198,14 +212,14 @@ dependencies:
198
212
  requirements:
199
213
  - - "~>"
200
214
  - !ruby/object:Gem::Version
201
- version: 1.18.1
215
+ version: 1.19.0
202
216
  type: :runtime
203
217
  prerelease: false
204
218
  version_requirements: !ruby/object:Gem::Requirement
205
219
  requirements:
206
220
  - - "~>"
207
221
  - !ruby/object:Gem::Version
208
- version: 1.18.1
222
+ version: 1.19.0
209
223
  - !ruby/object:Gem::Dependency
210
224
  name: relaton-iev
211
225
  requirement: !ruby/object:Gem::Requirement
@@ -528,6 +542,7 @@ files:
528
542
  - lib/metanorma/standoc/macros_embed.rb
529
543
  - lib/metanorma/standoc/macros_form.rb
530
544
  - lib/metanorma/standoc/macros_inline.rb
545
+ - lib/metanorma/standoc/macros_link.rb
531
546
  - lib/metanorma/standoc/macros_note.rb
532
547
  - lib/metanorma/standoc/macros_plantuml.rb
533
548
  - lib/metanorma/standoc/macros_terms.rb
@@ -567,7 +582,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
567
582
  requirements:
568
583
  - - ">="
569
584
  - !ruby/object:Gem::Version
570
- version: 2.7.0
585
+ version: 3.1.0
571
586
  required_rubygems_version: !ruby/object:Gem::Requirement
572
587
  requirements:
573
588
  - - ">="