metanorma-standoc 2.2.5 → 2.2.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (153) hide show
  1. checksums.yaml +4 -4
  2. data/lib/isodoc/html/htmlstyle.css +1 -1
  3. data/lib/metanorma/standoc/base.rb +4 -5
  4. data/lib/metanorma/standoc/basicdoc.rng +0 -27
  5. data/lib/metanorma/standoc/biblio-standoc.rng +164 -0
  6. data/lib/metanorma/standoc/biblio.rng +50 -18
  7. data/lib/metanorma/standoc/cleanup.rb +18 -17
  8. data/lib/metanorma/standoc/cleanup_amend.rb +2 -2
  9. data/lib/metanorma/standoc/cleanup_asciibib.rb +110 -0
  10. data/lib/metanorma/standoc/cleanup_biblio.rb +7 -112
  11. data/lib/metanorma/standoc/cleanup_block.rb +7 -6
  12. data/lib/metanorma/standoc/cleanup_boilerplate.rb +6 -6
  13. data/lib/metanorma/standoc/cleanup_inline.rb +2 -2
  14. data/lib/metanorma/standoc/cleanup_maths.rb +12 -4
  15. data/lib/metanorma/standoc/cleanup_section.rb +19 -9
  16. data/lib/metanorma/standoc/cleanup_symbols.rb +14 -7
  17. data/lib/metanorma/standoc/cleanup_text.rb +19 -6
  18. data/lib/metanorma/standoc/cleanup_toc.rb +1 -2
  19. data/lib/metanorma/standoc/cleanup_xref.rb +55 -14
  20. data/lib/metanorma/standoc/inline.rb +29 -12
  21. data/lib/metanorma/standoc/isodoc-compile.rng +7 -0
  22. data/lib/metanorma/standoc/isodoc.rng +69 -207
  23. data/lib/metanorma/standoc/ref_utility.rb +1 -0
  24. data/lib/metanorma/standoc/render.rb +10 -1
  25. data/lib/metanorma/standoc/section.rb +10 -3
  26. data/lib/metanorma/standoc/utils.rb +6 -1
  27. data/lib/metanorma/standoc/validate.rb +9 -9
  28. data/lib/metanorma/standoc/version.rb +1 -1
  29. data/metanorma-standoc.gemspec +5 -3
  30. metadata +7 -141
  31. data/.github/workflows/rake.yml +0 -15
  32. data/.github/workflows/release.yml +0 -24
  33. data/Rakefile +0 -8
  34. data/bin/rspec +0 -18
  35. data/spec/assets/a1.adoc +0 -8
  36. data/spec/assets/a2.adoc +0 -10
  37. data/spec/assets/a3.adoc +0 -9
  38. data/spec/assets/a3a.adoc +0 -7
  39. data/spec/assets/a4.adoc +0 -4
  40. data/spec/assets/boilerplate.xml +0 -4
  41. data/spec/assets/codes.yml +0 -695
  42. data/spec/assets/correct.png +0 -0
  43. data/spec/assets/corrupt.png +0 -0
  44. data/spec/assets/header.html +0 -7
  45. data/spec/assets/html-override.css +0 -1
  46. data/spec/assets/html.scss +0 -13
  47. data/spec/assets/htmlcover.html +0 -4
  48. data/spec/assets/htmlintro.html +0 -5
  49. data/spec/assets/i18n.yaml +0 -17
  50. data/spec/assets/iso.adoc +0 -10
  51. data/spec/assets/iso.headless.html +0 -33
  52. data/spec/assets/iso.xml +0 -8
  53. data/spec/assets/iso123.rxl +0 -107
  54. data/spec/assets/rice_image1.png +0 -0
  55. data/spec/assets/scripts.html +0 -3
  56. data/spec/assets/std.css +0 -2
  57. data/spec/assets/word-override.css +0 -1
  58. data/spec/assets/word.scss +0 -13
  59. data/spec/assets/wordcover.html +0 -3
  60. data/spec/assets/wordintro.html +0 -4
  61. data/spec/assets/xref_error.adoc +0 -8
  62. data/spec/examples/103_01_02.html +0 -247
  63. data/spec/examples/codes_table.html +0 -3174
  64. data/spec/examples/datamodel/address_class_profile.adoc +0 -5
  65. data/spec/examples/datamodel/address_class_profile.presentation.xml +0 -14
  66. data/spec/examples/datamodel/address_component_profile.adoc +0 -5
  67. data/spec/examples/datamodel/blank_definition_profile.adoc +0 -5
  68. data/spec/examples/datamodel/common_models_diagram.adoc +0 -5
  69. data/spec/examples/datamodel/models/models/AddressClassProfile.yml +0 -90
  70. data/spec/examples/datamodel/models/models/AddressComponentProfile.yml +0 -63
  71. data/spec/examples/datamodel/models/models/AddressComponentSpecification.yml +0 -15
  72. data/spec/examples/datamodel/models/models/AddressProfile.yml +0 -36
  73. data/spec/examples/datamodel/models/models/AttributeProfile.yml +0 -32
  74. data/spec/examples/datamodel/models/models/InterchangeAddressClassProfile.yml +0 -79
  75. data/spec/examples/datamodel/models/models/Localization copy.yml +0 -23
  76. data/spec/examples/datamodel/models/models/Localization.yml +0 -23
  77. data/spec/examples/datamodel/models/models/ProfileCompliantAddress.yml +0 -36
  78. data/spec/examples/datamodel/models/models/ProfileCompliantAddressComponent.yml +0 -15
  79. data/spec/examples/datamodel/models/models/Signature.yml +0 -20
  80. data/spec/examples/datamodel/models/models/SignatureBlankDefinition.yml +0 -20
  81. data/spec/examples/datamodel/models/models/TextDirectionCode copy.yml +0 -16
  82. data/spec/examples/datamodel/models/models/TextDirectionCode.yml +0 -16
  83. data/spec/examples/datamodel/models/models/Validity.yml +0 -14
  84. data/spec/examples/datamodel/models/models/iso19160-1/Address.yml +0 -22
  85. data/spec/examples/datamodel/models/models/iso19160-1/AddressComponent.yml +0 -2
  86. data/spec/examples/datamodel/models/style.uml.inc +0 -37
  87. data/spec/examples/datamodel/models/views/CommonModels.yml +0 -9
  88. data/spec/examples/datamodel/models/views/TopDown.yml +0 -62
  89. data/spec/examples/datamodel/top_down_diagram.adoc +0 -5
  90. data/spec/examples/english.yaml +0 -69
  91. data/spec/examples/iso_123_.xml +0 -46
  92. data/spec/examples/iso_123_all_parts.xml +0 -46
  93. data/spec/examples/iso_123_no_year_note.xml +0 -47
  94. data/spec/examples/iso_124_.xml +0 -42
  95. data/spec/examples/iso_216_.xml +0 -48
  96. data/spec/examples/iso_iec_12382_.xml +0 -49
  97. data/spec/examples/rice.adoc +0 -715
  98. data/spec/examples/rice.preview.html +0 -1877
  99. data/spec/examples/rice.sh +0 -4
  100. data/spec/examples/rice_images/rice_image1.png +0 -0
  101. data/spec/examples/rice_images/rice_image2.png +0 -0
  102. data/spec/examples/rice_images/rice_image3_1.png +0 -0
  103. data/spec/examples/rice_images/rice_image3_2.png +0 -0
  104. data/spec/examples/rice_images/rice_image3_3.png +0 -0
  105. data/spec/fixtures/action_schemaexpg1.svg +0 -122
  106. data/spec/fixtures/datamodel_description_sections_tree.xml +0 -327
  107. data/spec/fixtures/diagram_definitions.lutaml +0 -22
  108. data/spec/fixtures/macros_datamodel/address_class_profile.xml +0 -149
  109. data/spec/fixtures/macros_datamodel/address_component_profile.xml +0 -71
  110. data/spec/fixtures/macros_datamodel/blank_definition_profile.xml +0 -51
  111. data/spec/fixtures/macros_datamodel/common_models_diagram.xml +0 -7
  112. data/spec/fixtures/macros_datamodel/top_down_diagram.xml +0 -7
  113. data/spec/fixtures/test.exp +0 -121
  114. data/spec/fixtures/test.xmi +0 -9250
  115. data/spec/metanorma/base_spec.rb +0 -1125
  116. data/spec/metanorma/biblio_spec.rb +0 -1004
  117. data/spec/metanorma/blank_spec.rb +0 -37
  118. data/spec/metanorma/blocks_spec.rb +0 -1784
  119. data/spec/metanorma/cleanup_blocks_spec.rb +0 -1099
  120. data/spec/metanorma/cleanup_sections_spec.rb +0 -1850
  121. data/spec/metanorma/cleanup_spec.rb +0 -1920
  122. data/spec/metanorma/cleanup_terms_spec.rb +0 -1543
  123. data/spec/metanorma/datamodel/attributes_table_preprocessor_spec.rb +0 -111
  124. data/spec/metanorma/datamodel/diagram_preprocessor_spec.rb +0 -72
  125. data/spec/metanorma/inline_spec.rb +0 -724
  126. data/spec/metanorma/isobib_cache_spec.rb +0 -742
  127. data/spec/metanorma/lists_spec.rb +0 -232
  128. data/spec/metanorma/macros_concept_spec.rb +0 -1052
  129. data/spec/metanorma/macros_json2text_spec.rb +0 -10
  130. data/spec/metanorma/macros_plantuml_spec.rb +0 -402
  131. data/spec/metanorma/macros_spec.rb +0 -1183
  132. data/spec/metanorma/macros_yaml2text_spec.rb +0 -10
  133. data/spec/metanorma/processor_spec.rb +0 -96
  134. data/spec/metanorma/refs_spec.rb +0 -2807
  135. data/spec/metanorma/reqt_spec.rb +0 -130
  136. data/spec/metanorma/section_spec.rb +0 -1325
  137. data/spec/metanorma/table_spec.rb +0 -474
  138. data/spec/metanorma/validate_spec.rb +0 -886
  139. data/spec/spec_helper.rb +0 -290
  140. data/spec/support/shared_examples/structured_data_2_text_preprocessor.rb +0 -781
  141. data/spec/vcr_cassettes/bsi16341.yml +0 -488
  142. data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec.yml +0 -611
  143. data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec1.yml +0 -149
  144. data/spec/vcr_cassettes/hide_refs.yml +0 -587
  145. data/spec/vcr_cassettes/isobib_get_123.yml +0 -149
  146. data/spec/vcr_cassettes/isobib_get_123_1.yml +0 -295
  147. data/spec/vcr_cassettes/isobib_get_123_1_fr.yml +0 -385
  148. data/spec/vcr_cassettes/isobib_get_123_2.yml +0 -295
  149. data/spec/vcr_cassettes/isobib_get_123_2001.yml +0 -149
  150. data/spec/vcr_cassettes/isobib_get_124.yml +0 -149
  151. data/spec/vcr_cassettes/rfcbib_get_rfc8341.yml +0 -351
  152. data/spec/vcr_cassettes/separates_iev_citations_by_top_level_clause.yml +0 -560
  153. data/spec/vcr_cassettes/std-link.yml +0 -149
@@ -1,232 +0,0 @@
1
- require "spec_helper"
2
-
3
- RSpec.describe Metanorma::Standoc do
4
- it "processes simple lists" do
5
- output = Asciidoctor.convert(<<~"INPUT", *OPTIONS)
6
- #{ASCIIDOC_BLANK_HDR}
7
- .Unordered list
8
- * List 1
9
- * List 2
10
- * List 3
11
-
12
- * [*] checked
13
- * [x] also checked
14
- * [ ] not checked
15
-
16
- .Ordered list
17
- . List A
18
- . List B
19
- . List C
20
-
21
- .Definition list
22
- List D:: List E
23
- List F:: List G
24
-
25
- INPUT
26
- expect(xmlpp(strip_guid(output))).to be_equivalent_to xmlpp(<<~"OUTPUT")
27
- #{BLANK_HDR}
28
- <sections>
29
- <ul id='_'>
30
- <name>Unordered list</name>
31
- <li>
32
- <p id='_'>List 1</p>
33
- </li>
34
- <li>
35
- <p id='_'>List 2</p>
36
- </li>
37
- <li>
38
- <p id='_'>List 3</p>
39
- </li>
40
- <li uncheckedcheckbox='false' checkedcheckbox='true'>
41
- <p id='_'>checked</p>
42
- </li>
43
- <li uncheckedcheckbox='false' checkedcheckbox='true'>
44
- <p id='_'>also checked</p>
45
- </li>
46
- <li uncheckedcheckbox='true' checkedcheckbox='false'>
47
- <p id='_'>not checked</p>
48
- </li>
49
- </ul>
50
- <ol id='_' type='arabic'>
51
- <name>Ordered list</name>
52
- <li>
53
- <p id='_'>List A</p>
54
- </li>
55
- <li>
56
- <p id='_'>List B</p>
57
- </li>
58
- <li>
59
- <p id='_'>List C</p>
60
- </li>
61
- </ol>
62
- <dl id='_'>
63
- <name>Definition list</name>
64
- <dt>List D</dt>
65
- <dd>
66
- <p id='_'>List E</p>
67
- </dd>
68
- <dt>List F</dt>
69
- <dd>
70
- <p id='_'>List G</p>
71
- </dd>
72
- </dl>
73
- </sections>
74
- </standard-document>
75
- OUTPUT
76
- end
77
-
78
- it "processes complex lists" do
79
- output = Asciidoctor.convert(<<~"INPUT", *OPTIONS)
80
- #{ASCIIDOC_BLANK_HDR}
81
- [[id]]
82
- [keep-with-next=true,keep-lines-together=true,tag=X,multilingual-rendering=common]
83
- * First
84
- * Second
85
- +
86
- --
87
- entry1
88
-
89
- entry2
90
- --
91
-
92
- [[id1]]
93
- [keep-with-next=true,keep-lines-together=true,tag=X,multilingual-rendering=common]
94
- [loweralpha]
95
- . First
96
- . Second
97
- [upperalpha]
98
- .. Third
99
- .. Fourth
100
- . Fifth
101
- . Sixth
102
-
103
- [lowerroman]
104
- . A
105
- . B
106
- [upperroman]
107
- .. C
108
- .. D
109
- [arabic]
110
- ... E
111
- ... F
112
- [keep-with-next=true,keep-lines-together=true,tag=X,multilingual-rendering=common]
113
- Notes1::
114
- Notes:: Note 1.
115
- +
116
- Note 2.
117
- +
118
- Note 3.
119
-
120
- [%key]
121
- a:: b
122
-
123
- INPUT
124
- expect(xmlpp(strip_guid(output))).to be_equivalent_to xmlpp(<<~"OUTPUT")
125
- #{BLANK_HDR}
126
- <sections><ul id="id" keep-with-next="true" keep-lines-together="true" tag='X' multilingual-rendering='common' >
127
- <li>
128
- <p id="_">First</p>
129
- </li>
130
- <li><p id="_">Second</p><p id="_">entry1</p>
131
- <p id="_">entry2</p></li>
132
- </ul>
133
- <ol id="id1" type="alphabet" keep-with-next="true" keep-lines-together="true" tag='X' multilingual-rendering='common' >
134
- <li>
135
- <p id="_">First</p>
136
- </li>
137
- <li>
138
- <p id="_">Second</p>
139
- <ol id="_" type="alphabet_upper">
140
- <li>
141
- <p id="_">Third</p>
142
- </li>
143
- <li>
144
- <p id="_">Fourth</p>
145
- </li>
146
- </ol>
147
- </li>
148
- <li>
149
- <p id="_">Fifth</p>
150
- </li>
151
- <li>
152
- <p id="_">Sixth</p>
153
- </li>
154
- </ol>
155
- <ol id="_" type="roman">
156
- <li>
157
- <p id="_">A</p>
158
- </li>
159
- <li>
160
- <p id="_">B</p>
161
- <ol id="_" type="roman_upper">
162
- <li>
163
- <p id="_">C</p>
164
- </li>
165
- <li>
166
- <p id="_">D</p>
167
- <ol id="_" type="arabic">
168
- <li>
169
- <p id="_">E</p>
170
- </li>
171
- <li>
172
- <p id="_">F</p>
173
- <dl id="_" keep-with-next="true" keep-lines-together="true" tag='X' multilingual-rendering='common'>
174
- <dt>Notes1</dt>
175
- <dd/>
176
- <dt>Notes</dt>
177
- <dd><p id="_">Note 1.</p><p id="_">Note 2.</p>
178
- <p id="_">Note 3.</p></dd>
179
- </dl>
180
- </li>
181
- </ol>
182
- </li>
183
- </ol>
184
- </li>
185
- </ol><dl id='_' key='true'>
186
- <dt>a</dt>
187
- <dd>
188
- <p id='_'>b</p>
189
- </dd>
190
- </dl>
191
- </sections>
192
- </standard-document>
193
- OUTPUT
194
- end
195
-
196
- it "anchors lists and list items" do
197
- input = <<~INPUT
198
- #{ASCIIDOC_BLANK_HDR}
199
- [[id1]]
200
- * [[id2]] List item
201
- * Hello [[id3]] List item
202
-
203
- [[id4]]
204
- [[id5]]a:: [[id6]]b
205
- INPUT
206
- output = <<~OUTPUT
207
- #{BLANK_HDR}
208
- <sections>
209
- <ul id="id1">
210
- <li id="id2">
211
- <p id="_">List item</p>
212
- </li>
213
- <li>
214
- <p id="_">Hello <bookmark id="id3"/> List item</p>
215
- </li>
216
- </ul>
217
- <dl id='id4'>
218
- <dt id='id5'>a</dt>
219
- <dd>
220
- <p id='_'>
221
- <bookmark id='id6'/>
222
- b
223
- </p>
224
- </dd>
225
- </dl>
226
- </sections>
227
- </standard-document>
228
- OUTPUT
229
- expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
230
- .to be_equivalent_to xmlpp(output)
231
- end
232
- end