metanorma-standoc 1.8.6 → 1.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/.rubocop.yml +5 -3
- data/Gemfile.devel +0 -0
- data/lib/asciidoctor/standoc/base.rb +41 -36
- data/lib/asciidoctor/standoc/biblio.rng +4 -6
- data/lib/asciidoctor/standoc/blocks.rb +44 -14
- data/lib/asciidoctor/standoc/blocks_notes.rb +41 -24
- data/lib/asciidoctor/standoc/cleanup.rb +33 -78
- data/lib/asciidoctor/standoc/cleanup_block.rb +77 -62
- data/lib/asciidoctor/standoc/cleanup_boilerplate.rb +51 -29
- data/lib/asciidoctor/standoc/cleanup_footnotes.rb +1 -0
- data/lib/asciidoctor/standoc/cleanup_image.rb +71 -0
- data/lib/asciidoctor/standoc/cleanup_maths.rb +37 -28
- data/lib/asciidoctor/standoc/cleanup_ref.rb +24 -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 +21 -15
- data/lib/asciidoctor/standoc/converter.rb +10 -3
- 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 +5 -5
- data/lib/asciidoctor/standoc/inline.rb +1 -1
- data/lib/asciidoctor/standoc/isodoc.rng +304 -1
- data/lib/asciidoctor/standoc/lists.rb +4 -2
- data/lib/asciidoctor/standoc/macros.rb +50 -23
- data/lib/asciidoctor/standoc/macros_form.rb +63 -0
- 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 +22 -19
- data/lib/asciidoctor/standoc/section.rb +3 -1
- data/lib/asciidoctor/standoc/terms.rb +27 -16
- data/lib/asciidoctor/standoc/utils.rb +35 -9
- data/lib/asciidoctor/standoc/validate.rb +30 -28
- data/lib/metanorma-standoc.rb +0 -1
- data/lib/metanorma/standoc/version.rb +5 -5
- data/metanorma-standoc.gemspec +11 -11
- data/spec/asciidoctor/base_spec.rb +78 -8
- data/spec/asciidoctor/blocks_spec.rb +832 -727
- data/spec/asciidoctor/cleanup_sections_spec.rb +52 -15
- data/spec/asciidoctor/cleanup_spec.rb +1860 -1874
- data/spec/asciidoctor/inline_spec.rb +272 -273
- data/spec/asciidoctor/isobib_cache_spec.rb +406 -358
- data/spec/asciidoctor/macros_spec.rb +539 -437
- data/spec/asciidoctor/macros_yaml2text_spec.rb +1 -1
- data/spec/asciidoctor/refs_spec.rb +135 -7
- data/spec/asciidoctor/section_spec.rb +743 -690
- data/spec/assets/html-override.css +1 -0
- data/spec/assets/word-override.css +1 -0
- data/spec/spec_helper.rb +11 -9
- data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec.yml +60 -60
- data/spec/vcr_cassettes/isobib_get_123.yml +14 -14
- data/spec/vcr_cassettes/isobib_get_123_1.yml +30 -30
- data/spec/vcr_cassettes/isobib_get_123_1_fr.yml +42 -42
- data/spec/vcr_cassettes/isobib_get_123_2001.yml +15 -15
- data/spec/vcr_cassettes/isobib_get_124.yml +15 -15
- data/spec/vcr_cassettes/rfcbib_get_rfc8341.yml +14 -14
- data/spec/vcr_cassettes/separates_iev_citations_by_top_level_clause.yml +53 -49
- metadata +72 -68
- data/.rubocop.ribose.yml +0 -66
- data/.rubocop.tb.yml +0 -650
- data/spec/asciidoctor/macros_lutaml_spec.rb +0 -80
@@ -1,26 +1,31 @@
|
|
1
1
|
require "spec_helper"
|
2
2
|
require "open3"
|
3
3
|
|
4
|
+
OPTIONS = [backend: :standoc, header_footer: true].freeze
|
5
|
+
|
4
6
|
RSpec.describe Asciidoctor::Standoc do
|
5
|
-
|
6
|
-
|
7
|
+
it "processes format-specific pass blocks" do
|
8
|
+
input = <<~INPUT
|
7
9
|
#{ASCIIDOC_BLANK_HDR}
|
8
|
-
|
10
|
+
|
9
11
|
[format="rfc,html"]
|
10
12
|
++++
|
11
13
|
<abc>X > Y</abc>
|
12
14
|
++++
|
13
15
|
INPUT
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
16
|
+
output = <<~OUTPUT
|
17
|
+
#{BLANK_HDR}
|
18
|
+
<sections>
|
19
|
+
<passthrough formats='rfc,html'><abc>X > Y</abc></passthrough>
|
20
|
+
</sections>
|
21
|
+
</standard-document>
|
19
22
|
OUTPUT
|
23
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
24
|
+
.to be_equivalent_to xmlpp(output)
|
20
25
|
end
|
21
26
|
|
22
27
|
it "processes Metanorma XML pass blocks" do
|
23
|
-
|
28
|
+
input = <<~INPUT
|
24
29
|
#{ASCIIDOC_BLANK_HDR}
|
25
30
|
|
26
31
|
++++
|
@@ -31,16 +36,19 @@ RSpec.describe Asciidoctor::Standoc do
|
|
31
36
|
Y</abc>
|
32
37
|
++++
|
33
38
|
INPUT
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
+
output = <<~OUTPUT
|
40
|
+
#{BLANK_HDR}
|
41
|
+
<sections>
|
42
|
+
<abc>X > Y</abc>
|
43
|
+
</sections>
|
44
|
+
</standard-document>
|
39
45
|
OUTPUT
|
46
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
47
|
+
.to be_equivalent_to xmlpp(output)
|
40
48
|
end
|
41
49
|
|
42
50
|
it "processes open blocks" do
|
43
|
-
|
51
|
+
input = <<~INPUT
|
44
52
|
#{ASCIIDOC_BLANK_HDR}
|
45
53
|
--
|
46
54
|
x
|
@@ -50,23 +58,26 @@ RSpec.describe Asciidoctor::Standoc do
|
|
50
58
|
z
|
51
59
|
--
|
52
60
|
INPUT
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
61
|
+
output = <<~OUTPUT
|
62
|
+
#{BLANK_HDR}
|
63
|
+
<sections><p id="_">x</p>
|
64
|
+
<p id="_">y</p>
|
65
|
+
<p id="_">z</p></sections>
|
66
|
+
</standard-document>
|
58
67
|
OUTPUT
|
68
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
69
|
+
.to be_equivalent_to xmlpp(output)
|
59
70
|
end
|
60
71
|
|
61
72
|
it "processes stem blocks" do
|
62
|
-
|
73
|
+
input = <<~INPUT
|
63
74
|
#{ASCIIDOC_BLANK_HDR}
|
64
75
|
|
65
76
|
[[ABC]]
|
66
77
|
[stem%inequality,number=3,keep-with-next=true,keep-lines-together=true]
|
67
78
|
++++
|
68
|
-
r = 1 %
|
69
|
-
r = 1 %
|
79
|
+
r = 1 %
|
80
|
+
r = 1 %
|
70
81
|
++++
|
71
82
|
|
72
83
|
[stem%unnumbered]
|
@@ -85,155 +96,158 @@ RSpec.describe Asciidoctor::Standoc do
|
|
85
96
|
++++
|
86
97
|
|
87
98
|
INPUT
|
88
|
-
|
89
|
-
|
90
|
-
<
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
99
|
+
output = <<~OUTPUT
|
100
|
+
#{BLANK_HDR}
|
101
|
+
<sections>
|
102
|
+
<formula id='ABC' number='3' keep-with-next='true' keep-lines-together='true' inequality='true'>
|
103
|
+
<stem type='MathML'>
|
104
|
+
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
105
|
+
<mi>r</mi>
|
106
|
+
<mo>=</mo>
|
107
|
+
<mn>1</mn>
|
108
|
+
<mi>%</mi>
|
109
|
+
<mi>r</mi>
|
110
|
+
<mo>=</mo>
|
111
|
+
<mn>1</mn>
|
112
|
+
<mi>%</mi>
|
113
|
+
</math>
|
114
|
+
</stem>
|
115
|
+
</formula>
|
116
|
+
<formula id='_' unnumbered='true'>
|
117
|
+
<stem type='MathML'>
|
118
|
+
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
119
|
+
<msub>
|
120
|
+
<mrow>
|
121
|
+
<mrow>
|
122
|
+
<mi mathvariant='bold-italic'>F</mi>
|
123
|
+
</mrow>
|
124
|
+
</mrow>
|
125
|
+
<mrow>
|
126
|
+
<mrow>
|
127
|
+
<mi mathvariant='bold-italic'>Α</mi>
|
128
|
+
</mrow>
|
129
|
+
</mrow>
|
130
|
+
</msub>
|
131
|
+
</math>
|
132
|
+
</stem>
|
133
|
+
</formula>
|
134
|
+
<formula id='_' subsequence='A'>
|
135
|
+
<stem type='MathML'>
|
136
|
+
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
137
|
+
<mrow>
|
138
|
+
<mi>M</mi>
|
139
|
+
<mo>=</mo>
|
140
|
+
<mo>[</mo>
|
141
|
+
<mtable>
|
142
|
+
<mtr>
|
143
|
+
<mtd>
|
144
|
+
<mrow>
|
145
|
+
<mo>−</mo>
|
146
|
+
<mi>sin</mi>
|
147
|
+
</mrow>
|
148
|
+
<msub>
|
149
|
+
<mi>λ</mi>
|
150
|
+
<mn>0</mn>
|
151
|
+
</msub>
|
152
|
+
</mtd>
|
153
|
+
<mtd>
|
154
|
+
<mi>cos</mi>
|
155
|
+
<msub>
|
156
|
+
<mi>λ</mi>
|
157
|
+
<mn>0</mn>
|
158
|
+
</msub>
|
159
|
+
</mtd>
|
160
|
+
<mtd>
|
161
|
+
<mn>0</mn>
|
162
|
+
</mtd>
|
163
|
+
</mtr>
|
164
|
+
<mtr>
|
165
|
+
<mtd>
|
166
|
+
<mrow>
|
167
|
+
<mo>−</mo>
|
168
|
+
<mi>sin</mi>
|
169
|
+
</mrow>
|
170
|
+
<msub>
|
171
|
+
<mi>φ</mi>
|
172
|
+
<mn>0</mn>
|
173
|
+
</msub>
|
174
|
+
<mi>cos</mi>
|
175
|
+
<msub>
|
176
|
+
<mi>λ</mi>
|
177
|
+
<mn>0</mn>
|
178
|
+
</msub>
|
179
|
+
</mtd>
|
180
|
+
<mtd>
|
181
|
+
<mrow>
|
182
|
+
<mo>−</mo>
|
183
|
+
<mi>sin</mi>
|
184
|
+
</mrow>
|
185
|
+
<msub>
|
186
|
+
<mi>φ</mi>
|
187
|
+
<mn>0</mn>
|
188
|
+
</msub>
|
189
|
+
<mi>sin</mi>
|
190
|
+
<msub>
|
191
|
+
<mi>λ</mi>
|
192
|
+
<mn>0</mn>
|
193
|
+
</msub>
|
194
|
+
</mtd>
|
195
|
+
<mtd>
|
196
|
+
<mi>cos</mi>
|
197
|
+
<msub>
|
198
|
+
<mi>φ</mi>
|
199
|
+
<mn>0</mn>
|
200
|
+
</msub>
|
201
|
+
</mtd>
|
202
|
+
</mtr>
|
203
|
+
<mtr>
|
204
|
+
<mtd>
|
205
|
+
<mi>cos</mi>
|
206
|
+
<msub>
|
207
|
+
<mi>φ</mi>
|
208
|
+
<mn>0</mn>
|
209
|
+
</msub>
|
210
|
+
<mi>cos</mi>
|
211
|
+
<msub>
|
212
|
+
<mi>λ</mi>
|
213
|
+
<mn>0</mn>
|
214
|
+
</msub>
|
215
|
+
</mtd>
|
216
|
+
<mtd>
|
217
|
+
<mi>cos</mi>
|
218
|
+
<msub>
|
219
|
+
<mi>φ</mi>
|
220
|
+
<mn>0</mn>
|
221
|
+
</msub>
|
222
|
+
<mi>sin</mi>
|
223
|
+
<msub>
|
224
|
+
<mi>λ</mi>
|
225
|
+
<mn>0</mn>
|
226
|
+
</msub>
|
227
|
+
</mtd>
|
228
|
+
<mtd>
|
229
|
+
<mi>sin</mi>
|
230
|
+
<msub>
|
231
|
+
<mi>φ</mi>
|
232
|
+
<mn>0</mn>
|
233
|
+
</msub>
|
234
|
+
</mtd>
|
235
|
+
</mtr>
|
236
|
+
</mtable>
|
237
|
+
<mo>]</mo>
|
238
|
+
</mrow>
|
239
|
+
</math>
|
240
|
+
</stem>
|
241
|
+
</formula>
|
242
|
+
</sections>
|
243
|
+
</standard-document>
|
232
244
|
OUTPUT
|
245
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
246
|
+
.to be_equivalent_to xmlpp(output)
|
233
247
|
end
|
234
|
-
|
235
|
-
|
236
|
-
|
248
|
+
|
249
|
+
it "ignores review blocks unless document is in draft mode" do
|
250
|
+
input = <<~INPUT
|
237
251
|
#{ASCIIDOC_BLANK_HDR}
|
238
252
|
[[foreword]]
|
239
253
|
.Foreword
|
@@ -245,16 +259,17 @@ RSpec.describe Asciidoctor::Standoc do
|
|
245
259
|
|
246
260
|
For further information on the Foreword, see *ISO/IEC Directives, Part 2, 2016, Clause 12.*
|
247
261
|
****
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
262
|
+
INPUT
|
263
|
+
output = <<~OUTPUT
|
264
|
+
#{BLANK_HDR}
|
265
|
+
<sections><p id="foreword">Foreword</p>
|
266
|
+
</sections>
|
267
|
+
</standard-document>
|
268
|
+
OUTPUT
|
269
|
+
end
|
255
270
|
|
256
271
|
it "processes review blocks if document is in draft mode" do
|
257
|
-
|
272
|
+
input = <<~INPUT
|
258
273
|
= Document title
|
259
274
|
Author
|
260
275
|
:docfile: test.adoc
|
@@ -272,7 +287,8 @@ RSpec.describe Asciidoctor::Standoc do
|
|
272
287
|
|
273
288
|
For further information on the Foreword, see *ISO/IEC Directives, Part 2, 2016, Clause 12.*
|
274
289
|
****
|
275
|
-
|
290
|
+
INPUT
|
291
|
+
output = <<~OUTPUT
|
276
292
|
<standard-document xmlns="https://www.metanorma.org/ns/standoc" type="semantic" version="#{Metanorma::Standoc::VERSION}">
|
277
293
|
<bibdata type="standard">
|
278
294
|
<title language="en" format="text/plain">Document title</title>
|
@@ -296,11 +312,13 @@ RSpec.describe Asciidoctor::Standoc do
|
|
296
312
|
<p id="_">For further information on the Foreword, see <strong>ISO/IEC Directives, Part 2, 2016, Clause 12.</strong></p></review></sections>
|
297
313
|
</standard-document>
|
298
314
|
|
299
|
-
|
315
|
+
OUTPUT
|
316
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
317
|
+
.to be_equivalent_to xmlpp(output)
|
300
318
|
end
|
301
319
|
|
302
320
|
it "processes term notes" do
|
303
|
-
|
321
|
+
input = <<~INPUT
|
304
322
|
#{ASCIIDOC_BLANK_HDR}
|
305
323
|
== Terms and Definitions
|
306
324
|
|
@@ -312,29 +330,32 @@ RSpec.describe Asciidoctor::Standoc do
|
|
312
330
|
====
|
313
331
|
XYZ
|
314
332
|
====
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
</
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
333
|
+
INPUT
|
334
|
+
output = <<~OUTPUT
|
335
|
+
#{BLANK_HDR}
|
336
|
+
<sections>
|
337
|
+
<terms id="_" obligation="normative">
|
338
|
+
<title>Terms and definitions</title>
|
339
|
+
<p id="_">For the purposes of this document, the following terms and definitions apply.</p>
|
340
|
+
<term id="term-term1">
|
341
|
+
<preferred>Term1</preferred>
|
342
|
+
<termnote id="_">
|
343
|
+
<p id="_">This is a note</p>
|
344
|
+
</termnote>
|
345
|
+
<termnote id='_'>
|
346
|
+
<p id='_'>XYZ</p>
|
347
|
+
</termnote>
|
348
|
+
</term>
|
349
|
+
</terms>
|
350
|
+
</sections>
|
351
|
+
</standard-document>
|
352
|
+
OUTPUT
|
353
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
354
|
+
.to be_equivalent_to xmlpp(output)
|
334
355
|
end
|
335
356
|
|
336
|
-
|
337
|
-
|
357
|
+
it "processes term notes as plain notes in nonterm clauses" do
|
358
|
+
input = <<~INPUT
|
338
359
|
#{ASCIIDOC_BLANK_HDR}
|
339
360
|
== Terms and Definitions
|
340
361
|
|
@@ -348,33 +369,35 @@ RSpec.describe Asciidoctor::Standoc do
|
|
348
369
|
=== Term1
|
349
370
|
|
350
371
|
NOTE: This is a note
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
</
|
360
|
-
|
361
|
-
|
362
|
-
</
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
</
|
368
|
-
</
|
369
|
-
</
|
370
|
-
</
|
371
|
-
</
|
372
|
-
|
373
|
-
|
372
|
+
INPUT
|
373
|
+
output = <<~OUTPUT
|
374
|
+
#{BLANK_HDR}
|
375
|
+
<sections>
|
376
|
+
<terms id="_" obligation="normative">
|
377
|
+
<title>Terms and definitions</title>
|
378
|
+
<p id="_">No terms and definitions are listed in this document.</p>
|
379
|
+
<note id='_'>
|
380
|
+
<p id='_'>This is not a termnote</p>
|
381
|
+
</note>
|
382
|
+
<example id='_'>
|
383
|
+
<p id='_'>This is not a termexample</p>
|
384
|
+
</example>
|
385
|
+
<clause id="_" inline-header="false" obligation="normative">
|
386
|
+
<title>Term1</title>
|
387
|
+
<note id="_">
|
388
|
+
<p id="_">This is a note</p>
|
389
|
+
</note>
|
390
|
+
</clause>
|
391
|
+
</terms>
|
392
|
+
</sections>
|
393
|
+
</standard-document>
|
394
|
+
OUTPUT
|
395
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
396
|
+
.to be_equivalent_to xmlpp(output)
|
374
397
|
end
|
375
398
|
|
376
|
-
|
377
|
-
|
399
|
+
it "processes term notes as plain notes in definitions subclauses of terms & definitions" do
|
400
|
+
input = <<~INPUT
|
378
401
|
#{ASCIIDOC_BLANK_HDR}
|
379
402
|
== Terms and Definitions
|
380
403
|
|
@@ -383,28 +406,30 @@ RSpec.describe Asciidoctor::Standoc do
|
|
383
406
|
=== Symbols
|
384
407
|
|
385
408
|
NOTE: This is a note
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
<
|
391
|
-
<
|
392
|
-
|
393
|
-
</
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
</
|
399
|
-
</
|
400
|
-
</
|
401
|
-
</
|
402
|
-
|
403
|
-
|
409
|
+
INPUT
|
410
|
+
output = <<~OUTPUT
|
411
|
+
#{BLANK_HDR}
|
412
|
+
<sections>
|
413
|
+
<terms id="_" obligation="normative"><title>Terms, definitions and symbols</title>
|
414
|
+
<p id="_">For the purposes of this document, the following terms and definitions apply.</p>
|
415
|
+
<term id="term-term1">
|
416
|
+
<preferred>Term1</preferred>
|
417
|
+
</term>
|
418
|
+
<definitions id="_" obligation="normative" type="symbols">
|
419
|
+
<title>Symbols</title>
|
420
|
+
<note id="_">
|
421
|
+
<p id="_">This is a note</p>
|
422
|
+
</note>
|
423
|
+
</definitions></terms>
|
424
|
+
</sections>
|
425
|
+
</standard-document>
|
426
|
+
OUTPUT
|
427
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
428
|
+
.to be_equivalent_to xmlpp(output)
|
404
429
|
end
|
405
430
|
|
406
|
-
|
407
|
-
|
431
|
+
it "processes notes" do
|
432
|
+
input = <<~INPUT
|
408
433
|
#{ASCIIDOC_BLANK_HDR}
|
409
434
|
NOTE: This is a note
|
410
435
|
|
@@ -417,31 +442,34 @@ RSpec.describe Asciidoctor::Standoc do
|
|
417
442
|
====
|
418
443
|
XYZ
|
419
444
|
====
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
445
|
+
INPUT
|
446
|
+
output = <<~OUTPUT
|
447
|
+
#{BLANK_HDR}
|
448
|
+
<preface><foreword id="_" obligation="informative">
|
449
|
+
<title>Foreword</title>
|
450
|
+
<note id="_">
|
451
|
+
<p id="_">This is a note</p>
|
452
|
+
</note>
|
453
|
+
</foreword></preface><sections>
|
454
|
+
<note id='_' number="7" subsequence="A" keep-with-next="true" keep-lines-together="true" type="classified">
|
455
|
+
<p id='_'>XYZ</p>
|
456
|
+
</note>
|
457
|
+
<clause id="_" inline-header="false" obligation="normative">
|
458
|
+
<title>Clause 1</title>
|
459
|
+
<note id="ABC">
|
460
|
+
<p id="_">This is a note</p>
|
461
|
+
</note>
|
462
|
+
</clause></sections>
|
463
|
+
|
464
|
+
</standard-document>
|
439
465
|
|
440
|
-
|
441
|
-
|
466
|
+
OUTPUT
|
467
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
468
|
+
.to be_equivalent_to xmlpp(output)
|
469
|
+
end
|
442
470
|
|
443
|
-
|
444
|
-
|
471
|
+
it "processes literals" do
|
472
|
+
input = <<~INPUT
|
445
473
|
#{ASCIIDOC_BLANK_HDR}
|
446
474
|
|
447
475
|
[[ABC]]
|
@@ -450,7 +478,8 @@ RSpec.describe Asciidoctor::Standoc do
|
|
450
478
|
<LITERAL>
|
451
479
|
FIGURATIVE
|
452
480
|
....
|
453
|
-
|
481
|
+
INPUT
|
482
|
+
output = <<~OUTPUT
|
454
483
|
#{BLANK_HDR}
|
455
484
|
<sections>
|
456
485
|
<figure id="ABC" keep-with-next="true" keep-lines-together="true">
|
@@ -461,14 +490,17 @@ RSpec.describe Asciidoctor::Standoc do
|
|
461
490
|
</sections>
|
462
491
|
</standard-document>
|
463
492
|
|
464
|
-
|
465
|
-
|
493
|
+
OUTPUT
|
494
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
495
|
+
.to be_equivalent_to xmlpp(output)
|
496
|
+
end
|
466
497
|
|
467
|
-
|
468
|
-
|
498
|
+
it "processes simple admonitions with Asciidoc names" do
|
499
|
+
input = <<~INPUT
|
469
500
|
#{ASCIIDOC_BLANK_HDR}
|
470
501
|
CAUTION: Only use paddy or parboiled rice for the determination of husked rice yield.
|
471
|
-
|
502
|
+
INPUT
|
503
|
+
output = <<~OUTPUT
|
472
504
|
#{BLANK_HDR}
|
473
505
|
<sections>
|
474
506
|
<admonition id="_" type="caution">
|
@@ -477,14 +509,15 @@ RSpec.describe Asciidoctor::Standoc do
|
|
477
509
|
</sections>
|
478
510
|
</standard-document>
|
479
511
|
|
480
|
-
|
481
|
-
|
482
|
-
|
512
|
+
OUTPUT
|
513
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
514
|
+
.to be_equivalent_to xmlpp(output)
|
515
|
+
end
|
483
516
|
|
484
|
-
|
485
|
-
|
517
|
+
it "processes complex admonitions with non-Asciidoc names" do
|
518
|
+
input = <<~INPUT
|
486
519
|
#{ASCIIDOC_BLANK_HDR}
|
487
|
-
|
520
|
+
|
488
521
|
[[ABC]]
|
489
522
|
[CAUTION,type=Safety Precautions,keep-with-next="true",keep-lines-together="true"]
|
490
523
|
.Precautions
|
@@ -495,7 +528,8 @@ RSpec.describe Asciidoctor::Standoc do
|
|
495
528
|
. More than two glasses of orange juice in 24 hours makes them howl in harmony with alarms and sirens.
|
496
529
|
. Celery makes them sad.
|
497
530
|
====
|
498
|
-
|
531
|
+
INPUT
|
532
|
+
output = <<~OUTPUT
|
499
533
|
#{BLANK_HDR}
|
500
534
|
<sections>
|
501
535
|
<admonition id="ABC" type="safety precautions" keep-with-next="true" keep-lines-together="true">
|
@@ -514,11 +548,13 @@ RSpec.describe Asciidoctor::Standoc do
|
|
514
548
|
</sections>
|
515
549
|
</standard-document>
|
516
550
|
|
517
|
-
|
518
|
-
|
551
|
+
OUTPUT
|
552
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
553
|
+
.to be_equivalent_to xmlpp(output)
|
554
|
+
end
|
519
555
|
|
520
|
-
|
521
|
-
|
556
|
+
it "processes term examples" do
|
557
|
+
input = <<~INPUT
|
522
558
|
#{ASCIIDOC_BLANK_HDR}
|
523
559
|
== Terms and Definitions
|
524
560
|
|
@@ -527,26 +563,28 @@ RSpec.describe Asciidoctor::Standoc do
|
|
527
563
|
[[ABC]]
|
528
564
|
[example]
|
529
565
|
This is an example
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
<
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
<termexample id="ABC">
|
540
|
-
|
541
|
-
</termexample></term>
|
542
|
-
</terms>
|
543
|
-
</sections>
|
544
|
-
</standard-document>
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
566
|
+
INPUT
|
567
|
+
output = <<~OUTPUT
|
568
|
+
#{BLANK_HDR}
|
569
|
+
<sections>
|
570
|
+
<terms id="_" obligation="normative">
|
571
|
+
<title>Terms and definitions</title>
|
572
|
+
<p id="_">For the purposes of this document, the following terms and definitions apply.</p>
|
573
|
+
<term id="term-term1">
|
574
|
+
<preferred>Term1</preferred>
|
575
|
+
<termexample id="ABC">
|
576
|
+
<p id="_">This is an example</p>
|
577
|
+
</termexample></term>
|
578
|
+
</terms>
|
579
|
+
</sections>
|
580
|
+
</standard-document>
|
581
|
+
OUTPUT
|
582
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
583
|
+
.to be_equivalent_to xmlpp(output)
|
584
|
+
end
|
585
|
+
|
586
|
+
it "processes term examples as plain examples in nonterm clauses" do
|
587
|
+
input = <<~INPUT
|
550
588
|
#{ASCIIDOC_BLANK_HDR}
|
551
589
|
== Terms and Definitions
|
552
590
|
|
@@ -555,26 +593,29 @@ RSpec.describe Asciidoctor::Standoc do
|
|
555
593
|
|
556
594
|
[example]
|
557
595
|
This is an example
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
<
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
</
|
569
|
-
</
|
570
|
-
</
|
571
|
-
</
|
572
|
-
</
|
573
|
-
|
574
|
-
|
596
|
+
INPUT
|
597
|
+
output = <<~OUTPUT
|
598
|
+
#{BLANK_HDR}
|
599
|
+
<sections>
|
600
|
+
<terms id="_" obligation="normative">
|
601
|
+
<title>Terms and definitions</title>
|
602
|
+
<p id="_">No terms and definitions are listed in this document.</p>
|
603
|
+
<clause id="_" inline-header="false" obligation="normative">
|
604
|
+
<title>Term1</title>
|
605
|
+
<example id="_">
|
606
|
+
<p id="_">This is an example</p>
|
607
|
+
</example>
|
608
|
+
</clause>
|
609
|
+
</terms>
|
610
|
+
</sections>
|
611
|
+
</standard-document>
|
612
|
+
OUTPUT
|
613
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
614
|
+
.to be_equivalent_to xmlpp(output)
|
615
|
+
end
|
575
616
|
|
576
617
|
it "processes term examples as plain examples in definitions subclauses of terms & definitions" do
|
577
|
-
|
618
|
+
input = <<~INPUT
|
578
619
|
#{ASCIIDOC_BLANK_HDR}
|
579
620
|
== Terms and Definitions
|
580
621
|
|
@@ -584,27 +625,29 @@ RSpec.describe Asciidoctor::Standoc do
|
|
584
625
|
|
585
626
|
[example]
|
586
627
|
This is an example
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
<
|
592
|
-
|
593
|
-
</
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
</
|
599
|
-
</
|
600
|
-
</
|
601
|
-
</
|
602
|
-
|
628
|
+
INPUT
|
629
|
+
output = <<~OUTPUT
|
630
|
+
#{BLANK_HDR}
|
631
|
+
<sections>
|
632
|
+
<terms id="_" obligation="normative"><title>Terms, definitions and symbols</title>
|
633
|
+
<p id="_">For the purposes of this document, the following terms and definitions apply.</p><term id="term-term1">
|
634
|
+
<preferred>Term1</preferred>
|
635
|
+
</term>
|
636
|
+
<definitions id="_" obligation="normative" type="symbols">
|
637
|
+
<title>Symbols</title>
|
638
|
+
<example id="_">
|
639
|
+
<p id="_">This is an example</p>
|
640
|
+
</example>
|
641
|
+
</definitions></terms>
|
642
|
+
</sections>
|
643
|
+
</standard-document>
|
644
|
+
OUTPUT
|
645
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
646
|
+
.to be_equivalent_to xmlpp(output)
|
603
647
|
end
|
604
648
|
|
605
|
-
|
606
|
-
|
607
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
649
|
+
it "processes examples" do
|
650
|
+
input = <<~INPUT
|
608
651
|
#{ASCIIDOC_BLANK_HDR}
|
609
652
|
|
610
653
|
[[ABC]]
|
@@ -625,7 +668,8 @@ RSpec.describe Asciidoctor::Standoc do
|
|
625
668
|
====
|
626
669
|
This is yet another example
|
627
670
|
====
|
628
|
-
|
671
|
+
INPUT
|
672
|
+
output = <<~OUTPUT
|
629
673
|
#{BLANK_HDR}
|
630
674
|
<sections>
|
631
675
|
<example id="ABC" subsequence="A" keep-with-next='true' keep-lines-together='next'>
|
@@ -636,16 +680,19 @@ RSpec.describe Asciidoctor::Standoc do
|
|
636
680
|
<example id="_" number="3"><p id="_">This is yet another example</p></example>
|
637
681
|
</sections>
|
638
682
|
</standard-document>
|
639
|
-
|
640
|
-
|
683
|
+
OUTPUT
|
684
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
685
|
+
.to be_equivalent_to xmlpp(output)
|
686
|
+
end
|
641
687
|
|
642
|
-
|
643
|
-
|
688
|
+
it "processes preambles" do
|
689
|
+
input = <<~INPUT
|
644
690
|
#{ASCIIDOC_BLANK_HDR}
|
645
691
|
This is a preamble
|
646
692
|
|
647
693
|
== Section 1
|
648
|
-
|
694
|
+
INPUT
|
695
|
+
output = <<~OUTPUT
|
649
696
|
#{BLANK_HDR}
|
650
697
|
<preface><foreword id="_" obligation="informative">
|
651
698
|
<title>Foreword</title>
|
@@ -655,17 +702,20 @@ RSpec.describe Asciidoctor::Standoc do
|
|
655
702
|
<title>Section 1</title>
|
656
703
|
</clause></sections>
|
657
704
|
</standard-document>
|
658
|
-
|
659
|
-
|
705
|
+
OUTPUT
|
706
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
707
|
+
.to be_equivalent_to xmlpp(output)
|
708
|
+
end
|
660
709
|
|
661
|
-
|
662
|
-
|
710
|
+
it "processes preambles with titles" do
|
711
|
+
input = <<~INPUT
|
663
712
|
#{ASCIIDOC_BLANK_HDR}
|
664
713
|
.Preamble
|
665
714
|
This is a preamble
|
666
715
|
|
667
716
|
== Section 1
|
668
|
-
|
717
|
+
INPUT
|
718
|
+
output = <<~OUTPUT
|
669
719
|
#{BLANK_HDR}
|
670
720
|
<preface><foreword id="_" obligation="informative">
|
671
721
|
<title>Foreword</title>
|
@@ -675,11 +725,13 @@ RSpec.describe Asciidoctor::Standoc do
|
|
675
725
|
<title>Section 1</title>
|
676
726
|
</clause></sections>
|
677
727
|
</standard-document>
|
678
|
-
|
679
|
-
|
728
|
+
OUTPUT
|
729
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
730
|
+
.to be_equivalent_to xmlpp(output)
|
731
|
+
end
|
680
732
|
|
681
733
|
it "processes subfigures" do
|
682
|
-
|
734
|
+
input = <<~INPUT
|
683
735
|
#{ASCIIDOC_BLANK_HDR}
|
684
736
|
[[figureC-2]]
|
685
737
|
.Stages of gelatinization
|
@@ -694,27 +746,30 @@ RSpec.describe Asciidoctor::Standoc do
|
|
694
746
|
image::spec/examples/rice_images/rice_image3_3.png[]
|
695
747
|
====
|
696
748
|
INPUT
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
749
|
+
output = <<~OUTPUT
|
750
|
+
#{BLANK_HDR}
|
751
|
+
<sections>
|
752
|
+
<figure id="figureC-2"><name>Stages of gelatinization</name><figure id="_">
|
753
|
+
<name>Initial stages: No grains are fully gelatinized (ungelatinized starch granules are visible inside the kernels)</name>
|
754
|
+
<image src="spec/examples/rice_images/rice_image3_1.png" id="_" mimetype="image/png" height="auto" width="auto"/>
|
755
|
+
</figure>
|
756
|
+
<figure id="_">
|
757
|
+
<name>Intermediate stages: Some fully gelatinized kernels are visible</name>
|
758
|
+
<image src="spec/examples/rice_images/rice_image3_2.png" id="_" mimetype="image/png" height="auto" width="auto"/>
|
759
|
+
</figure>
|
760
|
+
<figure id="_">
|
761
|
+
<name>Final stages: All kernels are fully gelatinized</name>
|
762
|
+
<image src="spec/examples/rice_images/rice_image3_3.png" id="_" mimetype="image/png" height="auto" width="auto"/>
|
763
|
+
</figure></figure>
|
764
|
+
</sections>
|
765
|
+
</standard-document>
|
713
766
|
OUTPUT
|
767
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
768
|
+
.to be_equivalent_to xmlpp(output)
|
714
769
|
end
|
715
770
|
|
716
|
-
|
717
|
-
|
771
|
+
it "processes figures within examples" do
|
772
|
+
input = <<~INPUT
|
718
773
|
#{ASCIIDOC_BLANK_HDR}
|
719
774
|
[[figureC-2]]
|
720
775
|
.Stages of gelatinization
|
@@ -731,29 +786,31 @@ RSpec.describe Asciidoctor::Standoc do
|
|
731
786
|
image::spec/examples/rice_images/rice_image3_3.png[]
|
732
787
|
====
|
733
788
|
INPUT
|
734
|
-
|
735
|
-
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
|
750
|
-
|
789
|
+
output = <<~OUTPUT
|
790
|
+
#{BLANK_HDR}
|
791
|
+
<sections>
|
792
|
+
<example id="figureC-2"><name>Stages of gelatinization</name><figure id="_">
|
793
|
+
<name>Initial stages: No grains are fully gelatinized (ungelatinized starch granules are visible inside the kernels)</name>
|
794
|
+
<image src="spec/examples/rice_images/rice_image3_1.png" id="_" mimetype="image/png" height="auto" width="auto"/>
|
795
|
+
</figure>
|
796
|
+
<p id="_">Text</p>
|
797
|
+
<figure id="_">
|
798
|
+
<name>Intermediate stages: Some fully gelatinized kernels are visible</name>
|
799
|
+
<image src="spec/examples/rice_images/rice_image3_2.png" id="_" mimetype="image/png" height="auto" width="auto"/>
|
800
|
+
</figure>
|
801
|
+
<figure id="_">
|
802
|
+
<name>Final stages: All kernels are fully gelatinized</name>
|
803
|
+
<image src="spec/examples/rice_images/rice_image3_3.png" id="_" mimetype="image/png" height="auto" width="auto"/>
|
804
|
+
</figure></example>
|
805
|
+
</sections>
|
806
|
+
</standard-document>
|
751
807
|
OUTPUT
|
808
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
809
|
+
.to be_equivalent_to xmlpp(output)
|
752
810
|
end
|
753
811
|
|
754
|
-
|
755
|
-
|
756
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
812
|
+
it "processes images" do
|
813
|
+
input = <<~INPUT
|
757
814
|
#{ASCIIDOC_BLANK_HDR}
|
758
815
|
|
759
816
|
[[ABC]]
|
@@ -761,7 +818,8 @@ RSpec.describe Asciidoctor::Standoc do
|
|
761
818
|
.Split-it-right sample divider
|
762
819
|
image::spec/examples/rice_images/rice_image1.png[alttext]
|
763
820
|
|
764
|
-
|
821
|
+
INPUT
|
822
|
+
output = <<~OUTPUT
|
765
823
|
#{BLANK_HDR}
|
766
824
|
<sections>
|
767
825
|
<figure id="ABC" unnumbered="true" number="3">
|
@@ -770,17 +828,20 @@ RSpec.describe Asciidoctor::Standoc do
|
|
770
828
|
</figure>
|
771
829
|
</sections>
|
772
830
|
</standard-document>
|
773
|
-
|
774
|
-
|
831
|
+
OUTPUT
|
832
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
833
|
+
.to be_equivalent_to xmlpp(output)
|
834
|
+
end
|
775
835
|
|
776
|
-
|
777
|
-
|
836
|
+
it "processes data URI images" do
|
837
|
+
input = <<~INPUT
|
778
838
|
#{ASCIIDOC_BLANK_HDR}
|
779
839
|
[subsequence=A]
|
780
840
|
.Split-it-right sample divider
|
781
841
|
image::data:image/*;base64,iVBORw0KGgoAAAANSUhEUgAAAM4AAAAjCAYAAADcxTWYAAAAAXNSR0IArs4c6QAAExZJREFUeAHtnQmYVcWVx6t3oGn2xRVwQUEQIiKi0YgGVNxmjBCXQcOHkTiaxIwy6mSMqKhJXJKMcUky7kZjBDUoKsEIqIggLsEFUFFAFGSHpmm2Xub3v30LDuW7bwEUP+ed7/u9OudU3br3VtWpqnvfoykYdN2zbgekEccOgZOhNzSHDTAbJsBfYS5sl2wsLHVF9bXu5x/e4w6oWuBWl1RsVz35g3ZtC7TYvNZ90LSju7Hz+a62oMiV1W3atRe0E85evAN1DOLY38GeQR0a3W3hO3A93AL/CXnJt8A3pgUKt/NOruG40WCDZjn2HPgErIzAmAQ7EqS2vryeb4Fd3gLbEzjncdUjzZVPQz8DOkBX6Ai94G7w0g/lOW/k0/9/LVDvClz9N+i2cw2cPbj3B8z9/x79CHgC1hv/W+gXwCnG1x/9QmNnVNXYRfV1rhF7YukZZBj5U+EhaJahbD77K2wBhUxdQSHPN8Wu8Ivho628+u2aFJfUHt898DLcCV+bh9xct092pZnEjfwU0skzZJ4JekkguRm0EtXIyCQl9TXRC4GlpS1dl7Xz3OrSCldQn3Le6kNdamCJAnkzKJDy8jVoAb3kabNplWtaW+1WljR3JXXqnkiG83lZrKvfPoSHY1vJ/XCiFOQoKIcfyNjVkuuK831zwUONnk59jMwZcYGmpIelK2zzigmc9UVl7qXWh0YrTiGrT4Joa2jlEGvk9V3bAtVFjVyn6kWuz6p33MrSZs70Y9/gyg4O7P0Cu3Ng7zIzl8DRstkivtIppJ/kcNX3mrLnous1dkbR9qwtM9Ur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fekmXKHD8S4FUK84s8vU6VNIaCiItw4e2Zs35YeDy0hbuyd378Xsn/tJN6j9KmKGmfHa+BXZeC+QSOHrDMjU+9W9Jw1eT2hPaFUffa4TSH8dI6AeqLyvRS4Fm/OxmCX/dRv/Vh4InL/kW2JUtoH1ctqLRegzotfI/Ew7SqiNpCtqu6dttK/MwrrOOXPRS/nSq/vZwbXaLVS5V58vmWyCnFshlxVHFNZAUNMr3zzbaqqVacVRmuyXFjzu3u678gfkW2JEWyDVwMp3rLgqsAr2h+Kq+dMx0Tfn8fAvs9Bb4P/RCZMfd+bNlAAAAAElFTkSuQmCC[alttext]
|
782
842
|
|
783
|
-
|
843
|
+
INPUT
|
844
|
+
output = <<~OUTPUT
|
784
845
|
#{BLANK_HDR}
|
785
846
|
<sections>
|
786
847
|
<figure id="_" subsequence="A">
|
@@ -789,17 +850,20 @@ RSpec.describe Asciidoctor::Standoc do
|
|
789
850
|
</figure>
|
790
851
|
</sections>
|
791
852
|
</standard-document>
|
792
|
-
|
793
|
-
|
853
|
+
OUTPUT
|
854
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
855
|
+
.to be_equivalent_to xmlpp(output)
|
856
|
+
end
|
794
857
|
|
795
|
-
|
796
|
-
|
858
|
+
it "accepts attributes on images" do
|
859
|
+
input = <<~INPUT
|
797
860
|
#{ASCIIDOC_BLANK_HDR}
|
798
861
|
[height=4,width=3,alt="IMAGE",filename="riceimg1.png",titleattr="TITLE"]
|
799
862
|
.Caption
|
800
863
|
image::spec/examples/rice_images/rice_image1.png[]
|
801
864
|
|
802
|
-
|
865
|
+
INPUT
|
866
|
+
output = <<~OUTPUT
|
803
867
|
#{BLANK_HDR}
|
804
868
|
<sections>
|
805
869
|
<figure id="_"><name>Caption</name>
|
@@ -807,16 +871,19 @@ RSpec.describe Asciidoctor::Standoc do
|
|
807
871
|
</figure>
|
808
872
|
</sections>
|
809
873
|
</standard-document>
|
810
|
-
|
811
|
-
|
874
|
+
OUTPUT
|
875
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
876
|
+
.to be_equivalent_to xmlpp(output)
|
877
|
+
end
|
812
878
|
|
813
|
-
|
814
|
-
|
879
|
+
it "accepts auto for width and height attributes on images" do
|
880
|
+
input = <<~INPUT
|
815
881
|
#{ASCIIDOC_BLANK_HDR}
|
816
882
|
[height=4,width=auto]
|
817
883
|
image::spec/examples/rice_images/rice_image1.png[]
|
818
884
|
|
819
|
-
|
885
|
+
INPUT
|
886
|
+
output = <<~OUTPUT
|
820
887
|
#{BLANK_HDR}
|
821
888
|
<sections>
|
822
889
|
<figure id="_">
|
@@ -824,25 +891,30 @@ RSpec.describe Asciidoctor::Standoc do
|
|
824
891
|
</figure>
|
825
892
|
</sections>
|
826
893
|
</standard-document>
|
827
|
-
|
828
|
-
|
894
|
+
OUTPUT
|
895
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
896
|
+
.to be_equivalent_to xmlpp(output)
|
897
|
+
end
|
829
898
|
|
830
|
-
|
831
|
-
|
899
|
+
it "processes inline images with width and height attributes on images" do
|
900
|
+
input = <<~INPUT
|
832
901
|
#{ASCIIDOC_BLANK_HDR}
|
833
902
|
Hello image:spec/examples/rice_images/rice_image1.png[alt, 4, 3], how are you?
|
834
903
|
|
835
|
-
|
904
|
+
INPUT
|
905
|
+
output = <<~OUTPUT
|
836
906
|
#{BLANK_HDR}
|
837
907
|
<sections>
|
838
908
|
<p id="_">Hello <image src="spec/examples/rice_images/rice_image1.png" id="_" mimetype="image/png" height="3" width="4" alt="alt"/>, how are you?</p>
|
839
909
|
</sections>
|
840
910
|
</standard-document>
|
841
|
-
|
842
|
-
|
911
|
+
OUTPUT
|
912
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
913
|
+
.to be_equivalent_to xmlpp(output)
|
914
|
+
end
|
843
915
|
|
844
|
-
|
845
|
-
|
916
|
+
it "processes images as datauri" do
|
917
|
+
input = <<~INPUT
|
846
918
|
= Document title
|
847
919
|
Author
|
848
920
|
:docfile: test.adoc
|
@@ -853,25 +925,30 @@ RSpec.describe Asciidoctor::Standoc do
|
|
853
925
|
|
854
926
|
.Split-it-right sample divider
|
855
927
|
image::spec/examples/rice_images/rice_image1.png[]
|
856
|
-
|
857
|
-
|
928
|
+
INPUT
|
929
|
+
expect(strip_guid(Asciidoctor.convert(input, *OPTIONS)))
|
930
|
+
.to include '<image src="data:image/png;base64'
|
931
|
+
end
|
858
932
|
|
859
|
-
|
860
|
-
|
933
|
+
it "accepts attributes on paragraphs" do
|
934
|
+
input = <<~INPUT
|
861
935
|
#{ASCIIDOC_BLANK_HDR}
|
862
936
|
[align=right,keep-with-next=true,keep-lines-together=true]
|
863
937
|
This para is right-aligned.
|
864
|
-
|
938
|
+
INPUT
|
939
|
+
output = <<~OUTPUT
|
865
940
|
#{BLANK_HDR}
|
866
941
|
<sections>
|
867
942
|
<p align="right" id="_" keep-with-next="true" keep-lines-together="true">This para is right-aligned.</p>
|
868
943
|
</sections>
|
869
944
|
</standard-document>
|
870
|
-
|
871
|
-
|
945
|
+
OUTPUT
|
946
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
947
|
+
.to be_equivalent_to xmlpp(output)
|
948
|
+
end
|
872
949
|
|
873
|
-
|
874
|
-
|
950
|
+
it "processes blockquotes" do
|
951
|
+
input = <<~INPUT
|
875
952
|
#{ASCIIDOC_BLANK_HDR}
|
876
953
|
|
877
954
|
[[ABC]]
|
@@ -879,7 +956,8 @@ RSpec.describe Asciidoctor::Standoc do
|
|
879
956
|
____
|
880
957
|
Block quotation
|
881
958
|
____
|
882
|
-
|
959
|
+
INPUT
|
960
|
+
output = <<~OUTPUT
|
883
961
|
#{BLANK_HDR}
|
884
962
|
<sections>
|
885
963
|
<quote id="ABC" align="right" keep-with-next="true" keep-lines-together="true">
|
@@ -893,13 +971,15 @@ RSpec.describe Asciidoctor::Standoc do
|
|
893
971
|
</quote>
|
894
972
|
</sections>
|
895
973
|
</standard-document>
|
896
|
-
|
897
|
-
|
974
|
+
OUTPUT
|
975
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
976
|
+
.to be_equivalent_to xmlpp(output)
|
977
|
+
end
|
898
978
|
|
899
|
-
|
900
|
-
|
979
|
+
it "processes source code" do
|
980
|
+
input = <<~INPUT
|
901
981
|
#{ASCIIDOC_BLANK_HDR}
|
902
|
-
|
982
|
+
|
903
983
|
[[ABC]]
|
904
984
|
.Caption
|
905
985
|
[source%unnumbered,ruby,number=3,filename=sourcecode1.rb,keep-with-next=true,keep-lines-together=true]
|
@@ -909,7 +989,8 @@ RSpec.describe Asciidoctor::Standoc do
|
|
909
989
|
puts x
|
910
990
|
end
|
911
991
|
--
|
912
|
-
|
992
|
+
INPUT
|
993
|
+
output = <<~OUTPUT
|
913
994
|
#{BLANK_HDR}
|
914
995
|
<sections>
|
915
996
|
<sourcecode id="ABC" lang="ruby" filename="sourcecode1.rb" unnumbered="true" number="3" keep-with-next="true" keep-lines-together="true">
|
@@ -919,11 +1000,13 @@ RSpec.describe Asciidoctor::Standoc do
|
|
919
1000
|
end</sourcecode>
|
920
1001
|
</sections>
|
921
1002
|
</standard-document>
|
922
|
-
|
923
|
-
|
1003
|
+
OUTPUT
|
1004
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
1005
|
+
.to be_equivalent_to xmlpp(output)
|
1006
|
+
end
|
924
1007
|
|
925
|
-
|
926
|
-
|
1008
|
+
it "processes callouts" do
|
1009
|
+
input = <<~INPUT
|
927
1010
|
#{ASCIIDOC_BLANK_HDR}
|
928
1011
|
[source,ruby]
|
929
1012
|
--
|
@@ -934,7 +1017,8 @@ RSpec.describe Asciidoctor::Standoc do
|
|
934
1017
|
--
|
935
1018
|
<1> This is one callout
|
936
1019
|
<2> This is another callout
|
937
|
-
|
1020
|
+
INPUT
|
1021
|
+
output = <<~OUTPUT
|
938
1022
|
#{BLANK_HDR}
|
939
1023
|
<sections><sourcecode id="_" lang="ruby">puts "Hello, world." <callout target="_">1</callout>
|
940
1024
|
%w{a b c}.each do |x|
|
@@ -946,11 +1030,13 @@ RSpec.describe Asciidoctor::Standoc do
|
|
946
1030
|
</annotation></sourcecode>
|
947
1031
|
</sections>
|
948
1032
|
</standard-document>
|
949
|
-
|
950
|
-
|
1033
|
+
OUTPUT
|
1034
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
1035
|
+
.to be_equivalent_to xmlpp(output)
|
1036
|
+
end
|
951
1037
|
|
952
|
-
|
953
|
-
|
1038
|
+
it "processes unmodified term sources" do
|
1039
|
+
input = <<~INPUT
|
954
1040
|
#{ASCIIDOC_BLANK_HDR}
|
955
1041
|
== Terms and Definitions
|
956
1042
|
|
@@ -959,6 +1045,9 @@ RSpec.describe Asciidoctor::Standoc do
|
|
959
1045
|
[.source]
|
960
1046
|
<<ISO2191,section=1>>
|
961
1047
|
|
1048
|
+
[.source]
|
1049
|
+
<<ISO2191,droploc%capital%section=1>>
|
1050
|
+
|
962
1051
|
=== Term2
|
963
1052
|
|
964
1053
|
Definition
|
@@ -971,51 +1060,61 @@ RSpec.describe Asciidoctor::Standoc do
|
|
971
1060
|
|
972
1061
|
[.source]
|
973
1062
|
{{IEV:xyz,t1,t2}}
|
974
|
-
|
975
|
-
|
976
|
-
|
977
|
-
|
978
|
-
|
979
|
-
|
980
|
-
|
981
|
-
|
982
|
-
|
983
|
-
|
984
|
-
|
985
|
-
|
986
|
-
|
987
|
-
|
988
|
-
|
989
|
-
|
990
|
-
|
991
|
-
|
992
|
-
|
993
|
-
|
994
|
-
|
995
|
-
|
996
|
-
|
997
|
-
|
998
|
-
|
999
|
-
|
1000
|
-
|
1001
|
-
|
1002
|
-
|
1003
|
-
|
1004
|
-
|
1005
|
-
|
1006
|
-
|
1007
|
-
|
1008
|
-
|
1009
|
-
|
1010
|
-
</
|
1011
|
-
|
1012
|
-
|
1013
|
-
|
1014
|
-
|
1015
|
-
|
1063
|
+
INPUT
|
1064
|
+
output = <<~OUTPUT
|
1065
|
+
#{BLANK_HDR}
|
1066
|
+
<sections>
|
1067
|
+
<terms id="_" obligation="normative">
|
1068
|
+
<title>Terms and definitions</title><p id="_">For the purposes of this document,
|
1069
|
+
the following terms and definitions apply.</p>
|
1070
|
+
<term id="term-term1">
|
1071
|
+
<preferred>Term1</preferred>
|
1072
|
+
<termsource status="identical">
|
1073
|
+
<origin bibitemid="ISO2191" type="inline" citeas="">
|
1074
|
+
<localityStack>
|
1075
|
+
<locality type="section"><referenceFrom>1</referenceFrom></locality>
|
1076
|
+
</localityStack>
|
1077
|
+
</origin>
|
1078
|
+
</termsource>
|
1079
|
+
<termsource status="identical">
|
1080
|
+
<origin bibitemid="ISO2191" type="inline" citeas="" case='capital' droploc='true'>
|
1081
|
+
<localityStack>
|
1082
|
+
<locality type="section"><referenceFrom>1</referenceFrom></locality>
|
1083
|
+
</localityStack>
|
1084
|
+
</origin>
|
1085
|
+
</termsource>
|
1086
|
+
</term>
|
1087
|
+
<term id='term-term2'>
|
1088
|
+
<preferred>Term2</preferred>
|
1089
|
+
<definition>
|
1090
|
+
<p id='_'>Definition</p>
|
1091
|
+
</definition>
|
1092
|
+
<termsource status='identical'>
|
1093
|
+
<origin citeas=''>
|
1094
|
+
<termref base='IEV' target='xyz'/>
|
1095
|
+
</origin>
|
1096
|
+
</termsource>
|
1097
|
+
<termsource status='identical'>
|
1098
|
+
<origin citeas=''>
|
1099
|
+
<termref base='IEV' target='xyz'>t1</termref>
|
1100
|
+
</origin>
|
1101
|
+
</termsource>
|
1102
|
+
<termsource status='identical'>
|
1103
|
+
<origin citeas=''>
|
1104
|
+
<termref base='IEV' target='xyz'>t1</termref>
|
1105
|
+
</origin>
|
1106
|
+
</termsource>
|
1107
|
+
</term>
|
1108
|
+
</terms>
|
1109
|
+
</sections>
|
1110
|
+
</standard-document>
|
1111
|
+
OUTPUT
|
1112
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
1113
|
+
.to be_equivalent_to xmlpp(output)
|
1114
|
+
end
|
1016
1115
|
|
1017
|
-
|
1018
|
-
|
1116
|
+
it "processes modified term sources" do
|
1117
|
+
input = <<~INPUT
|
1019
1118
|
#{ASCIIDOC_BLANK_HDR}
|
1020
1119
|
== Terms and Definitions
|
1021
1120
|
|
@@ -1030,47 +1129,50 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1030
1129
|
|
1031
1130
|
[.source]
|
1032
1131
|
{{IEV:xyz}}, with adjustments
|
1033
|
-
|
1034
|
-
|
1035
|
-
|
1036
|
-
|
1037
|
-
|
1038
|
-
|
1039
|
-
|
1040
|
-
|
1041
|
-
|
1042
|
-
|
1043
|
-
|
1044
|
-
|
1045
|
-
|
1046
|
-
|
1047
|
-
|
1048
|
-
|
1049
|
-
|
1050
|
-
|
1051
|
-
|
1052
|
-
|
1053
|
-
|
1054
|
-
|
1055
|
-
|
1056
|
-
|
1057
|
-
|
1058
|
-
|
1059
|
-
|
1060
|
-
|
1061
|
-
|
1062
|
-
|
1063
|
-
|
1064
|
-
|
1065
|
-
|
1066
|
-
</
|
1067
|
-
|
1068
|
-
|
1069
|
-
|
1070
|
-
|
1071
|
-
|
1132
|
+
INPUT
|
1133
|
+
output = <<~OUTPUT
|
1134
|
+
#{BLANK_HDR}
|
1135
|
+
<sections>
|
1136
|
+
<terms id="_" obligation="normative">
|
1137
|
+
<title>Terms and definitions</title>
|
1138
|
+
<p id="_">For the purposes of this document,
|
1139
|
+
the following terms and definitions apply.</p>
|
1140
|
+
<term id="term-term1">
|
1141
|
+
<preferred>Term1</preferred>
|
1142
|
+
<termsource status="modified">
|
1143
|
+
<origin bibitemid="ISO2191" type="inline" citeas="">
|
1144
|
+
<localityStack>
|
1145
|
+
<locality type="section"><referenceFrom>1</referenceFrom></locality>
|
1146
|
+
</localityStack>
|
1147
|
+
</origin>
|
1148
|
+
<modification>
|
1149
|
+
<p id="_">with adjustments</p>
|
1150
|
+
</modification>
|
1151
|
+
</termsource>
|
1152
|
+
</term>
|
1153
|
+
<term id='term-term2'>
|
1154
|
+
<preferred>Term2</preferred>
|
1155
|
+
<definition>
|
1156
|
+
<p id='_'>Definition</p>
|
1157
|
+
</definition>
|
1158
|
+
<termsource status='modified'>
|
1159
|
+
<origin citeas=''>
|
1160
|
+
<termref base='IEV' target='xyz'/>
|
1161
|
+
</origin>
|
1162
|
+
<modification>
|
1163
|
+
<p id='_'>with adjustments</p>
|
1164
|
+
</modification>
|
1165
|
+
</termsource>
|
1166
|
+
</term>
|
1167
|
+
</terms>
|
1168
|
+
</sections>
|
1169
|
+
</standard-document>
|
1170
|
+
OUTPUT
|
1171
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
1172
|
+
.to be_equivalent_to xmlpp(output)
|
1173
|
+
end
|
1072
1174
|
|
1073
|
-
|
1175
|
+
it "processes recommendation" do
|
1074
1176
|
input = <<~"INPUT"
|
1075
1177
|
#{ASCIIDOC_BLANK_HDR}
|
1076
1178
|
[.recommendation,label="/ogc/recommendation/wfs/2",subject="user",inherit="/ss/584/2015/level/1; /ss/584/2015/level/2",options="unnumbered",type=verification,model=ogc]
|
@@ -1078,24 +1180,25 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1078
1180
|
I recommend this
|
1079
1181
|
====
|
1080
1182
|
INPUT
|
1081
|
-
|
1082
|
-
|
1083
|
-
|
1084
|
-
|
1085
|
-
|
1086
|
-
<subject>user</subject>
|
1087
|
-
<inherit>/ss/584/2015/level/1</inherit>
|
1088
|
-
<inherit>/ss/584/2015/level/2</inherit>
|
1089
|
-
|
1090
|
-
</recommendation>
|
1091
|
-
|
1092
|
-
|
1183
|
+
output = <<~"OUTPUT"
|
1184
|
+
#{BLANK_HDR}
|
1185
|
+
<sections>
|
1186
|
+
<recommendation id="_" unnumbered="true" type="verification" model="ogc">
|
1187
|
+
<label>/ogc/recommendation/wfs/2</label>
|
1188
|
+
<subject>user</subject>
|
1189
|
+
<inherit>/ss/584/2015/level/1</inherit>
|
1190
|
+
<inherit>/ss/584/2015/level/2</inherit>
|
1191
|
+
<description><p id="_">I recommend this</p></description>
|
1192
|
+
</recommendation>
|
1193
|
+
</sections>
|
1194
|
+
</standard-document>
|
1093
1195
|
OUTPUT
|
1094
1196
|
|
1095
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(input,
|
1197
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
1198
|
+
.to be_equivalent_to xmlpp(output)
|
1096
1199
|
end
|
1097
1200
|
|
1098
|
-
|
1201
|
+
it "processes requirement" do
|
1099
1202
|
input = <<~"INPUT"
|
1100
1203
|
#{ASCIIDOC_BLANK_HDR}
|
1101
1204
|
[[ABC]]
|
@@ -1105,22 +1208,23 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1105
1208
|
I recommend this
|
1106
1209
|
====
|
1107
1210
|
INPUT
|
1108
|
-
|
1109
|
-
|
1110
|
-
|
1111
|
-
|
1112
|
-
|
1113
|
-
|
1114
|
-
|
1115
|
-
</requirement>
|
1116
|
-
|
1117
|
-
|
1211
|
+
output = <<~OUTPUT
|
1212
|
+
#{BLANK_HDR}
|
1213
|
+
<sections>
|
1214
|
+
<requirement id="ABC" subsequence="A" number="3" keep-with-next="true" keep-lines-together="true">
|
1215
|
+
<title>Title</title>
|
1216
|
+
<inherit>/ss/584/2015/level/1 & /ss/584/2015/level/2</inherit>
|
1217
|
+
<description><p id="_">I recommend this</p></description>
|
1218
|
+
</requirement>
|
1219
|
+
</sections>
|
1220
|
+
</standard-document>
|
1118
1221
|
OUTPUT
|
1119
1222
|
|
1120
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(input,
|
1223
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
1224
|
+
.to be_equivalent_to xmlpp(output)
|
1121
1225
|
end
|
1122
1226
|
|
1123
|
-
|
1227
|
+
it "processes permission" do
|
1124
1228
|
input = <<~"INPUT"
|
1125
1229
|
#{ASCIIDOC_BLANK_HDR}
|
1126
1230
|
|
@@ -1130,21 +1234,21 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1130
1234
|
I recommend this
|
1131
1235
|
====
|
1132
1236
|
INPUT
|
1133
|
-
|
1134
|
-
|
1135
|
-
|
1136
|
-
|
1137
|
-
|
1138
|
-
</permission>
|
1139
|
-
|
1140
|
-
|
1237
|
+
output = <<~"OUTPUT"
|
1238
|
+
#{BLANK_HDR}
|
1239
|
+
<sections>
|
1240
|
+
<permission id="ABC">
|
1241
|
+
<description><p id="_">I recommend this</p></description>
|
1242
|
+
</permission>
|
1243
|
+
</sections>
|
1244
|
+
</standard-document>
|
1141
1245
|
OUTPUT
|
1142
1246
|
|
1143
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(input,
|
1247
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
1248
|
+
.to be_equivalent_to xmlpp(output)
|
1144
1249
|
end
|
1145
1250
|
|
1146
|
-
|
1147
|
-
it "processes nested permissions" do
|
1251
|
+
it "processes nested permissions" do
|
1148
1252
|
input = <<~"INPUT"
|
1149
1253
|
#{ASCIIDOC_BLANK_HDR}
|
1150
1254
|
[.permission]
|
@@ -1161,24 +1265,25 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1161
1265
|
=====
|
1162
1266
|
====
|
1163
1267
|
INPUT
|
1164
|
-
|
1165
|
-
|
1166
|
-
|
1167
|
-
|
1168
|
-
<example id="_">
|
1169
|
-
|
1170
|
-
</example></description>
|
1171
|
-
<permission id="_">
|
1172
|
-
|
1173
|
-
</permission></permission>
|
1174
|
-
</sections>
|
1175
|
-
</standard-document>
|
1268
|
+
output = <<~"OUTPUT"
|
1269
|
+
#{BLANK_HDR}
|
1270
|
+
<sections>
|
1271
|
+
<permission id="_"><description><p id="_">I permit this</p>
|
1272
|
+
<example id="_">
|
1273
|
+
<p id="_">Example 2</p>
|
1274
|
+
</example></description>
|
1275
|
+
<permission id="_">
|
1276
|
+
<description><p id="_">I also permit this</p></description>
|
1277
|
+
</permission></permission>
|
1278
|
+
</sections>
|
1279
|
+
</standard-document>
|
1176
1280
|
OUTPUT
|
1177
1281
|
|
1178
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(input,
|
1282
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
1283
|
+
.to be_equivalent_to xmlpp(output)
|
1179
1284
|
end
|
1180
1285
|
|
1181
|
-
|
1286
|
+
it "processes recommendation with internal markup of structure" do
|
1182
1287
|
input = <<~"INPUT"
|
1183
1288
|
#{ASCIIDOC_BLANK_HDR}
|
1184
1289
|
|
@@ -1194,7 +1299,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1194
1299
|
|Object |Value
|
1195
1300
|
|Mission | Accomplished
|
1196
1301
|
|===
|
1197
|
-
--
|
1302
|
+
--
|
1198
1303
|
|
1199
1304
|
As for the measurement targets,
|
1200
1305
|
|
@@ -1219,7 +1324,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1219
1324
|
end
|
1220
1325
|
----
|
1221
1326
|
--
|
1222
|
-
|
1327
|
+
|
1223
1328
|
[.import%exclude]
|
1224
1329
|
--
|
1225
1330
|
[source,CoreRoot]
|
@@ -1229,167 +1334,167 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1229
1334
|
--
|
1230
1335
|
====
|
1231
1336
|
INPUT
|
1232
|
-
|
1233
|
-
|
1234
|
-
|
1235
|
-
|
1236
|
-
<classification><tag>control-class</tag><value>Technical</value></classification><classification><tag>priority</tag><value>P0</value></classification><classification><tag>family</tag><value>System & Communications Protection</value></classification><classification><tag>family</tag><value>System and Communications Protocols</value></classification>
|
1237
|
-
|
1238
|
-
|
1239
|
-
|
1240
|
-
|
1241
|
-
|
1242
|
-
|
1243
|
-
</mrow>
|
1244
|
-
<mrow>
|
1245
|
-
|
1246
|
-
</mrow>
|
1247
|
-
</mfrac><mo>=</mo><mn>0</mn></math></stem></formula></measurement-target>
|
1248
|
-
|
1249
|
-
if (success)
|
1250
|
-
|
1251
|
-
end</sourcecode></verification>
|
1252
|
-
|
1253
|
-
|
1254
|
-
|
1337
|
+
output = <<~"OUTPUT"
|
1338
|
+
#{BLANK_HDR}
|
1339
|
+
<sections>
|
1340
|
+
<recommendation id="ABC" obligation="permission,recommendation" filename="reqt1.rq"><label>/ogc/recommendation/wfs/2</label><subject>user</subject>
|
1341
|
+
<classification><tag>control-class</tag><value>Technical</value></classification><classification><tag>priority</tag><value>P0</value></classification><classification><tag>family</tag><value>System & Communications Protection</value></classification><classification><tag>family</tag><value>System and Communications Protocols</value></classification>
|
1342
|
+
<description><p id="_">I recommend <em>this</em>.</p>
|
1343
|
+
</description><specification exclude="false" type="tabular" keep-with-next="true" keep-lines-together="true"><p id="_">This is the object of the recommendation:</p><table id="_"> <tbody> <tr> <td valign="top" align="left">Object</td> <td valign="top" align="left">Value</td> </tr> <tr> <td valign="top" align="left">Mission</td> <td valign="top" align="left">Accomplished</td> </tr> </tbody></table></specification><description>
|
1344
|
+
<p id="_">As for the measurement targets,</p>
|
1345
|
+
</description><measurement-target exclude="false"><p id="_">The measurement target shall be measured as:</p><formula id="_"> <stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><mfrac>
|
1346
|
+
<mrow>
|
1347
|
+
<mi>r</mi>
|
1348
|
+
</mrow>
|
1349
|
+
<mrow>
|
1350
|
+
<mn>1</mn>
|
1351
|
+
</mrow>
|
1352
|
+
</mfrac><mo>=</mo><mn>0</mn></math></stem></formula></measurement-target>
|
1353
|
+
<verification exclude="false"><p id="_">The following code will be run for verification:</p><sourcecode lang="CoreRoot" id="_">CoreRoot(success): HttpResponse
|
1354
|
+
if (success)
|
1355
|
+
recommendation(label: success-response)
|
1356
|
+
end</sourcecode></verification>
|
1357
|
+
<import exclude="true"> <sourcecode lang="CoreRoot" id="_">success-response()</sourcecode></import></recommendation>
|
1358
|
+
</sections>
|
1359
|
+
</standard-document>
|
1255
1360
|
OUTPUT
|
1256
1361
|
|
1257
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(input,
|
1362
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
1363
|
+
.to be_equivalent_to xmlpp(output)
|
1258
1364
|
end
|
1259
1365
|
|
1260
1366
|
it "processes delete change clauses" do
|
1261
1367
|
input = <<~"INPUT"
|
1262
|
-
#{ASCIIDOC_BLANK_HDR}
|
1263
|
-
[change="modify",locality="page=27",path="//table[2]",path_end="//table[2]/following-sibling:example[1]",title="Change"]
|
1264
|
-
==== Change Clause
|
1265
|
-
_This table contains information on polygon cells which are not included in ISO 10303-52. Remove table 2 completely and replace with:_
|
1266
|
-
INPUT
|
1267
|
-
|
1268
|
-
|
1269
|
-
|
1270
|
-
|
1271
|
-
|
1272
|
-
|
1273
|
-
|
1274
|
-
|
1275
|
-
|
1276
|
-
|
1277
|
-
|
1278
|
-
|
1279
|
-
|
1280
|
-
|
1281
|
-
|
1282
|
-
|
1283
|
-
|
1284
|
-
</sections>
|
1285
|
-
|
1286
|
-
|
1287
|
-
|
1288
|
-
|
1368
|
+
#{ASCIIDOC_BLANK_HDR}
|
1369
|
+
[change="modify",locality="page=27",path="//table[2]",path_end="//table[2]/following-sibling:example[1]",title="Change"]
|
1370
|
+
==== Change Clause
|
1371
|
+
_This table contains information on polygon cells which are not included in ISO 10303-52. Remove table 2 completely and replace with:_
|
1372
|
+
INPUT
|
1373
|
+
output = <<~"OUTPUT"
|
1374
|
+
#{BLANK_HDR}
|
1375
|
+
<sections>
|
1376
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
1377
|
+
<title>Change Clause</title>
|
1378
|
+
<amend id='_' change='modify' path='//table[2]' path_end='//table[2]/following-sibling:example[1]' title='Change'>
|
1379
|
+
<description>
|
1380
|
+
<p id='_'>
|
1381
|
+
<em>
|
1382
|
+
This table contains information on polygon cells which are not
|
1383
|
+
included in ISO 10303-52. Remove table 2 completely and replace
|
1384
|
+
with:
|
1385
|
+
</em>
|
1386
|
+
</p>
|
1387
|
+
</description>
|
1388
|
+
</amend>
|
1389
|
+
</clause>
|
1390
|
+
</sections>
|
1391
|
+
</standard-document>
|
1392
|
+
OUTPUT
|
1393
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
1394
|
+
.to be_equivalent_to xmlpp(output)
|
1289
1395
|
end
|
1290
1396
|
|
1291
1397
|
it "processes modify change clauses" do
|
1292
1398
|
input = <<~"INPUT"
|
1293
|
-
#{ASCIIDOC_BLANK_HDR}
|
1294
|
-
[change="modify",locality="page=27",path="//table[2]",path_end="//table[2]/following-sibling:example[1]",title="Change"]
|
1295
|
-
==== Change Clause
|
1399
|
+
#{ASCIIDOC_BLANK_HDR}
|
1400
|
+
[change="modify",locality="page=27",path="//table[2]",path_end="//table[2]/following-sibling:example[1]",title="Change"]
|
1401
|
+
==== Change Clause
|
1296
1402
|
|
1297
|
-
autonumber:table[2]
|
1298
|
-
autonumber:note[7]
|
1403
|
+
autonumber:table[2]
|
1404
|
+
autonumber:note[7]
|
1299
1405
|
|
1300
|
-
_This table contains information on polygon cells which are not included in ISO 10303-52. Remove table 2 completely and replace with:_
|
1406
|
+
_This table contains information on polygon cells which are not included in ISO 10303-52. Remove table 2 completely and replace with:_
|
1301
1407
|
|
1302
|
-
____
|
1303
|
-
.Edges of triangle and quadrilateral cells
|
1304
|
-
|===
|
1305
|
-
2+^.^h| triangle 2+^.^h| quadrilateral
|
1306
|
-
^.^| edge ^.^| vertices ^.^| edge ^.^| vertices
|
1307
|
-
^.^| 1 ^.^| 1, 2 ^.^| 1 ^.^| 1, 2
|
1308
|
-
^.^| 2 ^.^| 2, 3 ^.^| 2 ^.^| 2, 3
|
1309
|
-
^.^| 3 ^.^| 3, 1 ^.^| 3 ^.^| 3, 4
|
1310
|
-
| | ^.^| 4 ^.^| 4, 1
|
1311
|
-
|===
|
1408
|
+
____
|
1409
|
+
.Edges of triangle and quadrilateral cells
|
1410
|
+
|===
|
1411
|
+
2+^.^h| triangle 2+^.^h| quadrilateral
|
1412
|
+
^.^| edge ^.^| vertices ^.^| edge ^.^| vertices
|
1413
|
+
^.^| 1 ^.^| 1, 2 ^.^| 1 ^.^| 1, 2
|
1414
|
+
^.^| 2 ^.^| 2, 3 ^.^| 2 ^.^| 2, 3
|
1415
|
+
^.^| 3 ^.^| 3, 1 ^.^| 3 ^.^| 3, 4
|
1416
|
+
| | ^.^| 4 ^.^| 4, 1
|
1417
|
+
|===
|
1312
1418
|
|
1313
|
-
====
|
1314
|
-
This is not generalised further.
|
1315
|
-
====
|
1419
|
+
====
|
1420
|
+
This is not generalised further.
|
1421
|
+
====
|
1316
1422
|
|
1317
|
-
____
|
1423
|
+
____
|
1318
1424
|
|
1319
|
-
Any further exceptions can be ignored.
|
1425
|
+
Any further exceptions can be ignored.
|
1320
1426
|
INPUT
|
1321
1427
|
|
1322
|
-
|
1323
|
-
|
1324
|
-
|
1325
|
-
|
1326
|
-
|
1327
|
-
|
1328
|
-
|
1329
|
-
|
1330
|
-
|
1331
|
-
|
1332
|
-
|
1333
|
-
|
1334
|
-
|
1335
|
-
|
1336
|
-
|
1337
|
-
|
1338
|
-
|
1339
|
-
|
1340
|
-
|
1341
|
-
|
1342
|
-
|
1343
|
-
|
1344
|
-
|
1345
|
-
|
1346
|
-
|
1347
|
-
|
1348
|
-
|
1349
|
-
|
1350
|
-
|
1351
|
-
|
1352
|
-
|
1353
|
-
|
1354
|
-
|
1355
|
-
|
1356
|
-
|
1357
|
-
|
1358
|
-
|
1359
|
-
|
1360
|
-
|
1361
|
-
|
1362
|
-
|
1363
|
-
|
1364
|
-
|
1365
|
-
|
1366
|
-
|
1367
|
-
|
1368
|
-
|
1369
|
-
|
1370
|
-
|
1371
|
-
|
1372
|
-
|
1373
|
-
|
1374
|
-
|
1375
|
-
|
1376
|
-
|
1377
|
-
|
1378
|
-
|
1379
|
-
|
1380
|
-
|
1381
|
-
|
1382
|
-
|
1383
|
-
|
1384
|
-
|
1385
|
-
</description>
|
1386
|
-
|
1387
|
-
|
1388
|
-
</sections>
|
1389
|
-
|
1390
|
-
|
1391
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(input,
|
1428
|
+
output = <<~"OUTPUT"
|
1429
|
+
#{BLANK_HDR}
|
1430
|
+
<sections>
|
1431
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
1432
|
+
<title>Change Clause</title>
|
1433
|
+
<amend id='_' change='modify' path='//table[2]' path_end='//table[2]/following-sibling:example[1]' title='Change'>
|
1434
|
+
<autonumber type='table'>2</autonumber>
|
1435
|
+
<autonumber type='note'>7</autonumber>
|
1436
|
+
<description>
|
1437
|
+
<p id='_'>
|
1438
|
+
<em>
|
1439
|
+
This table contains information on polygon cells which are not
|
1440
|
+
included in ISO 10303-52. Remove table 2 completely and replace
|
1441
|
+
with:
|
1442
|
+
</em>
|
1443
|
+
</p>
|
1444
|
+
</description>
|
1445
|
+
<newcontent id='_'>
|
1446
|
+
<table id='_'>
|
1447
|
+
<name>Edges of triangle and quadrilateral cells</name>
|
1448
|
+
<tbody>
|
1449
|
+
<tr>
|
1450
|
+
<th colspan='2' valign='middle' align='center'>triangle</th>
|
1451
|
+
<th colspan='2' valign='middle' align='center'>quadrilateral</th>
|
1452
|
+
</tr>
|
1453
|
+
<tr>
|
1454
|
+
<td valign='middle' align='center'>edge</td>
|
1455
|
+
<td valign='middle' align='center'>vertices</td>
|
1456
|
+
<td valign='middle' align='center'>edge</td>
|
1457
|
+
<td valign='middle' align='center'>vertices</td>
|
1458
|
+
</tr>
|
1459
|
+
<tr>
|
1460
|
+
<td valign='middle' align='center'>1</td>
|
1461
|
+
<td valign='middle' align='center'>1, 2</td>
|
1462
|
+
<td valign='middle' align='center'>1</td>
|
1463
|
+
<td valign='middle' align='center'>1, 2</td>
|
1464
|
+
</tr>
|
1465
|
+
<tr>
|
1466
|
+
<td valign='middle' align='center'>2</td>
|
1467
|
+
<td valign='middle' align='center'>2, 3</td>
|
1468
|
+
<td valign='middle' align='center'>2</td>
|
1469
|
+
<td valign='middle' align='center'>2, 3</td>
|
1470
|
+
</tr>
|
1471
|
+
<tr>
|
1472
|
+
<td valign='middle' align='center'>3</td>
|
1473
|
+
<td valign='middle' align='center'>3, 1</td>
|
1474
|
+
<td valign='middle' align='center'>3</td>
|
1475
|
+
<td valign='middle' align='center'>3, 4</td>
|
1476
|
+
</tr>
|
1477
|
+
<tr>
|
1478
|
+
<td valign='top' align='left'/>
|
1479
|
+
<td valign='top' align='left'/>
|
1480
|
+
<td valign='middle' align='center'>4</td>
|
1481
|
+
<td valign='middle' align='center'>4, 1</td>
|
1482
|
+
</tr>
|
1483
|
+
</tbody>
|
1484
|
+
</table>
|
1485
|
+
<example id='_'>
|
1486
|
+
<p id='_'>This is not generalised further.</p>
|
1487
|
+
</example>
|
1488
|
+
</newcontent>
|
1489
|
+
<description>
|
1490
|
+
<p id='_'>Any further exceptions can be ignored.</p>
|
1491
|
+
</description>
|
1492
|
+
</amend>
|
1493
|
+
</clause>
|
1494
|
+
</sections>
|
1495
|
+
</standard-document>
|
1496
|
+
OUTPUT
|
1497
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
1498
|
+
.to be_equivalent_to xmlpp(output)
|
1392
1499
|
end
|
1393
|
-
|
1394
|
-
|
1395
1500
|
end
|