metanorma-standoc 1.9.0 → 1.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +3 -13
- data/.hound.yml +3 -1
- data/.rubocop.yml +4 -8
- data/lib/asciidoctor/standoc/base.rb +31 -35
- data/lib/asciidoctor/standoc/biblio.rng +1 -0
- data/lib/asciidoctor/standoc/blocks.rb +25 -9
- data/lib/asciidoctor/standoc/blocks_notes.rb +41 -24
- data/lib/asciidoctor/standoc/cleanup.rb +59 -84
- data/lib/asciidoctor/standoc/cleanup_block.rb +63 -85
- data/lib/asciidoctor/standoc/cleanup_boilerplate.rb +28 -15
- data/lib/asciidoctor/standoc/cleanup_footnotes.rb +1 -0
- data/lib/asciidoctor/standoc/cleanup_image.rb +71 -0
- data/lib/asciidoctor/standoc/cleanup_inline.rb +117 -77
- data/lib/asciidoctor/standoc/cleanup_maths.rb +36 -27
- data/lib/asciidoctor/standoc/cleanup_ref.rb +31 -15
- data/lib/asciidoctor/standoc/cleanup_ref_dl.rb +1 -1
- data/lib/asciidoctor/standoc/cleanup_reqt.rb +47 -0
- data/lib/asciidoctor/standoc/cleanup_section.rb +77 -135
- data/lib/asciidoctor/standoc/cleanup_section_names.rb +75 -0
- data/lib/asciidoctor/standoc/cleanup_terms.rb +19 -18
- data/lib/asciidoctor/standoc/converter.rb +7 -2
- data/lib/asciidoctor/standoc/datamodel/plantuml_renderer.rb +67 -66
- data/lib/asciidoctor/standoc/front.rb +35 -18
- data/lib/asciidoctor/standoc/front_contributor.rb +70 -45
- data/lib/asciidoctor/standoc/inline.rb +45 -34
- data/lib/asciidoctor/standoc/isodoc.rng +209 -4
- data/lib/asciidoctor/standoc/lists.rb +4 -2
- data/lib/asciidoctor/standoc/macros.rb +11 -11
- data/lib/asciidoctor/standoc/macros_form.rb +63 -0
- data/lib/asciidoctor/standoc/macros_plantuml.rb +19 -21
- data/lib/asciidoctor/standoc/macros_terms.rb +33 -23
- data/lib/asciidoctor/standoc/ref.rb +87 -112
- data/lib/asciidoctor/standoc/ref_date_id.rb +62 -0
- data/lib/asciidoctor/standoc/ref_sect.rb +20 -17
- data/lib/asciidoctor/standoc/section.rb +3 -1
- data/lib/asciidoctor/standoc/term_lookup_cleanup.rb +40 -27
- data/lib/asciidoctor/standoc/terms.rb +25 -18
- data/lib/asciidoctor/standoc/utils.rb +35 -9
- data/lib/asciidoctor/standoc/validate.rb +48 -33
- data/lib/metanorma-standoc.rb +0 -1
- data/lib/metanorma/standoc/version.rb +1 -1
- data/metanorma-standoc.gemspec +4 -4
- data/spec/asciidoctor/base_spec.rb +701 -508
- data/spec/asciidoctor/blocks_spec.rb +831 -738
- data/spec/asciidoctor/cleanup_sections_spec.rb +51 -14
- data/spec/asciidoctor/cleanup_spec.rb +889 -682
- data/spec/asciidoctor/inline_spec.rb +62 -14
- data/spec/asciidoctor/isobib_cache_spec.rb +404 -358
- data/spec/asciidoctor/lists_spec.rb +149 -137
- data/spec/asciidoctor/macros_plantuml_spec.rb +8 -8
- data/spec/asciidoctor/macros_spec.rb +923 -503
- data/spec/asciidoctor/macros_yaml2text_spec.rb +1 -1
- data/spec/asciidoctor/refs_dl_spec.rb +4 -4
- data/spec/asciidoctor/refs_spec.rb +1528 -1533
- data/spec/asciidoctor/section_spec.rb +405 -299
- data/spec/asciidoctor/table_spec.rb +6 -6
- data/spec/asciidoctor/validate_spec.rb +342 -304
- data/spec/spec_helper.rb +13 -9
- data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec.yml +54 -54
- data/spec/vcr_cassettes/isobib_get_123.yml +13 -13
- data/spec/vcr_cassettes/isobib_get_123_1.yml +25 -25
- data/spec/vcr_cassettes/isobib_get_123_1_fr.yml +37 -37
- data/spec/vcr_cassettes/isobib_get_123_2001.yml +12 -12
- data/spec/vcr_cassettes/isobib_get_124.yml +13 -13
- data/spec/vcr_cassettes/rfcbib_get_rfc8341.yml +14 -14
- data/spec/vcr_cassettes/separates_iev_citations_by_top_level_clause.yml +46 -46
- metadata +16 -15
- data/lib/liquid/custom_blocks/key_iterator.rb +0 -21
- data/lib/liquid/custom_blocks/with_json_nested_context.rb +0 -18
- data/lib/liquid/custom_blocks/with_yaml_nested_context.rb +0 -19
- data/lib/liquid/custom_filters/values.rb +0 -7
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: 1.
|
4
|
+
version: 1.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-07-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: asciidoctor
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 1.
|
47
|
+
version: 1.7.0
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 1.
|
54
|
+
version: 1.7.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: metanorma-plugin-datastruct
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -70,16 +70,16 @@ dependencies:
|
|
70
70
|
name: metanorma-plugin-lutaml
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0
|
75
|
+
version: '0'
|
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: 0
|
82
|
+
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: ruby-jing
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -170,14 +170,14 @@ dependencies:
|
|
170
170
|
requirements:
|
171
171
|
- - "~>"
|
172
172
|
- !ruby/object:Gem::Version
|
173
|
-
version: 1.
|
173
|
+
version: 1.8.0
|
174
174
|
type: :runtime
|
175
175
|
prerelease: false
|
176
176
|
version_requirements: !ruby/object:Gem::Requirement
|
177
177
|
requirements:
|
178
178
|
- - "~>"
|
179
179
|
- !ruby/object:Gem::Version
|
180
|
-
version: 1.
|
180
|
+
version: 1.8.0
|
181
181
|
- !ruby/object:Gem::Dependency
|
182
182
|
name: relaton-iev
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|
@@ -410,11 +410,14 @@ files:
|
|
410
410
|
- lib/asciidoctor/standoc/cleanup_block.rb
|
411
411
|
- lib/asciidoctor/standoc/cleanup_boilerplate.rb
|
412
412
|
- lib/asciidoctor/standoc/cleanup_footnotes.rb
|
413
|
+
- lib/asciidoctor/standoc/cleanup_image.rb
|
413
414
|
- lib/asciidoctor/standoc/cleanup_inline.rb
|
414
415
|
- lib/asciidoctor/standoc/cleanup_maths.rb
|
415
416
|
- lib/asciidoctor/standoc/cleanup_ref.rb
|
416
417
|
- lib/asciidoctor/standoc/cleanup_ref_dl.rb
|
418
|
+
- lib/asciidoctor/standoc/cleanup_reqt.rb
|
417
419
|
- lib/asciidoctor/standoc/cleanup_section.rb
|
420
|
+
- lib/asciidoctor/standoc/cleanup_section_names.rb
|
418
421
|
- lib/asciidoctor/standoc/cleanup_terms.rb
|
419
422
|
- lib/asciidoctor/standoc/converter.rb
|
420
423
|
- lib/asciidoctor/standoc/datamodel/attributes_table_preprocessor.rb
|
@@ -426,9 +429,11 @@ files:
|
|
426
429
|
- lib/asciidoctor/standoc/isodoc.rng
|
427
430
|
- lib/asciidoctor/standoc/lists.rb
|
428
431
|
- lib/asciidoctor/standoc/macros.rb
|
432
|
+
- lib/asciidoctor/standoc/macros_form.rb
|
429
433
|
- lib/asciidoctor/standoc/macros_plantuml.rb
|
430
434
|
- lib/asciidoctor/standoc/macros_terms.rb
|
431
435
|
- lib/asciidoctor/standoc/ref.rb
|
436
|
+
- lib/asciidoctor/standoc/ref_date_id.rb
|
432
437
|
- lib/asciidoctor/standoc/ref_sect.rb
|
433
438
|
- lib/asciidoctor/standoc/reqt.rb
|
434
439
|
- lib/asciidoctor/standoc/reqt.rng
|
@@ -441,10 +446,6 @@ files:
|
|
441
446
|
- lib/asciidoctor/standoc/validate_section.rb
|
442
447
|
- lib/asciidoctor/standoc/views/datamodel/model_representation.adoc.erb
|
443
448
|
- lib/asciidoctor/standoc/views/datamodel/plantuml_representation.adoc.erb
|
444
|
-
- lib/liquid/custom_blocks/key_iterator.rb
|
445
|
-
- lib/liquid/custom_blocks/with_json_nested_context.rb
|
446
|
-
- lib/liquid/custom_blocks/with_yaml_nested_context.rb
|
447
|
-
- lib/liquid/custom_filters/values.rb
|
448
449
|
- lib/metanorma-standoc.rb
|
449
450
|
- lib/metanorma/standoc.rb
|
450
451
|
- lib/metanorma/standoc/processor.rb
|
@@ -560,7 +561,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
560
561
|
requirements:
|
561
562
|
- - ">="
|
562
563
|
- !ruby/object:Gem::Version
|
563
|
-
version: 2.
|
564
|
+
version: 2.5.0
|
564
565
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
565
566
|
requirements:
|
566
567
|
- - ">="
|
@@ -1,21 +0,0 @@
|
|
1
|
-
module Liquid
|
2
|
-
module CustomBlocks
|
3
|
-
class KeyIterator < Block
|
4
|
-
def initialize(tag_name, markup, tokens)
|
5
|
-
super
|
6
|
-
@context_name, @var_name = markup.split(',').map(&:strip)
|
7
|
-
end
|
8
|
-
|
9
|
-
def render(context)
|
10
|
-
res = ''
|
11
|
-
iterator = context[@context_name].is_a?(Hash) ? context[@context_name].keys : context[@context_name]
|
12
|
-
iterator.each.with_index do |key, index|
|
13
|
-
context['index'] = index
|
14
|
-
context[@var_name] = key
|
15
|
-
res += super
|
16
|
-
end
|
17
|
-
res
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
module Liquid
|
2
|
-
module CustomBlocks
|
3
|
-
class WithJsonNestedContext < Block
|
4
|
-
def initialize(tag_name, markup, tokens)
|
5
|
-
super
|
6
|
-
@context_file_variable, @context_name = markup.split(",").map(&:strip)
|
7
|
-
end
|
8
|
-
|
9
|
-
def render(context)
|
10
|
-
context_file = context[@context_file_variable].to_s.strip
|
11
|
-
context[@context_name] = JSON.parse(
|
12
|
-
File.read(context_file, encoding: "utf-8")
|
13
|
-
)
|
14
|
-
super
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
@@ -1,19 +0,0 @@
|
|
1
|
-
module Liquid
|
2
|
-
module CustomBlocks
|
3
|
-
class WithYamlNestedContext < Block
|
4
|
-
def initialize(tag_name, markup, tokens)
|
5
|
-
super
|
6
|
-
@context_file_variable, @context_name = markup.split(",").map(&:strip)
|
7
|
-
end
|
8
|
-
|
9
|
-
def render(context)
|
10
|
-
context_file = context[@context_file_variable].to_s.strip
|
11
|
-
context[@context_name] = YAML.safe_load(
|
12
|
-
File.read(context_file, encoding: "utf-8"),
|
13
|
-
[Date, Time]
|
14
|
-
)
|
15
|
-
super
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|