metanorma-bsi 0.0.1 → 0.1.0
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.
Potentially problematic release.
This version of metanorma-bsi might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +43 -0
- data/.github/workflows/release_github_packages.yml +49 -0
- data/.hound.yml +3 -1
- data/.rubocop.yml +4 -8
- data/README.adoc +95 -11
- data/lib/asciidoctor/bsi/biblio.rng +1 -0
- data/lib/asciidoctor/bsi/bsi.rng +32 -4
- data/lib/asciidoctor/bsi/bsi_intro_en.xml +87 -61
- data/lib/asciidoctor/bsi/cleanup.rb +15 -8
- data/lib/asciidoctor/bsi/cleanup_ref.rb +10 -21
- data/lib/asciidoctor/bsi/converter.rb +7 -5
- data/lib/asciidoctor/bsi/front.rb +26 -5
- data/lib/asciidoctor/bsi/isodoc.rng +191 -3
- data/lib/asciidoctor/bsi/isostandard.rng +12 -0
- data/lib/asciidoctor/bsi/validate.rb +5 -6
- data/lib/asciidoctor/bsi/validate_list.rb +2 -2
- data/lib/isodoc/bsi/base_convert.rb +2 -1
- data/lib/isodoc/bsi/bsi.international-standard.xsl +3380 -2349
- data/lib/isodoc/bsi/html/htmlstyle.css +43 -22
- data/lib/isodoc/bsi/html/htmlstyle.scss +46 -22
- data/lib/isodoc/bsi/html_convert.rb +2 -2
- data/lib/isodoc/bsi/i18n-en.yaml +4 -4
- data/lib/isodoc/bsi/metadata.rb +2 -2
- data/lib/isodoc/bsi/presentation_xml_convert.rb +26 -5
- data/lib/isodoc/bsi/xref.rb +11 -4
- data/lib/metanorma/bsi/version.rb +1 -1
- data/metanorma-bsi.gemspec +2 -2
- data/spec/asciidoctor/base_spec.rb +564 -494
- data/spec/asciidoctor/blocks_spec.rb +192 -195
- data/spec/asciidoctor/cleanup_spec.rb +361 -361
- data/spec/asciidoctor/refs_spec.rb +8 -78
- data/spec/asciidoctor/section_spec.rb +227 -227
- data/spec/asciidoctor/validate_spec.rb +26 -1
- data/spec/isodoc/blocks_spec.rb +56 -21
- data/spec/isodoc/i18n_spec.rb +156 -234
- data/spec/isodoc/inline_spec.rb +7 -7
- data/spec/isodoc/iso_spec.rb +4 -4
- data/spec/isodoc/metadata_spec.rb +0 -1
- data/spec/isodoc/ref_spec.rb +7 -7
- data/spec/isodoc/section_spec.rb +400 -343
- data/spec/isodoc/terms_spec.rb +224 -225
- data/spec/isodoc/xref_spec.rb +1347 -1360
- data/spec/metanorma/processor_spec.rb +37 -40
- data/spec/spec_helper.rb +6 -4
- data/spec/vcr_cassettes/iso-639.yml +19 -19
- data/spec/vcr_cassettes/isobib_get_639_1967.yml +17 -17
- data/spec/vcr_cassettes/multistandard.yml +15 -193
- metadata +7 -5
@@ -2,8 +2,8 @@ require "spec_helper"
|
|
2
2
|
|
3
3
|
RSpec.describe Asciidoctor::BSI do
|
4
4
|
before(:all) do
|
5
|
-
|
6
|
-
end
|
5
|
+
@blank_hdr = blank_hdr_gen
|
6
|
+
end
|
7
7
|
|
8
8
|
it "processes open blocks" do
|
9
9
|
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :bsi, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
@@ -16,11 +16,11 @@ end
|
|
16
16
|
z
|
17
17
|
--
|
18
18
|
INPUT
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
19
|
+
#{@blank_hdr}
|
20
|
+
<sections><p id="_">x</p>
|
21
|
+
<p id="_">y</p>
|
22
|
+
<p id="_">z</p></sections>
|
23
|
+
</bsi-standard>
|
24
24
|
OUTPUT
|
25
25
|
end
|
26
26
|
|
@@ -29,8 +29,8 @@ end
|
|
29
29
|
#{ASCIIDOC_BLANK_HDR}
|
30
30
|
[stem]
|
31
31
|
++++
|
32
|
-
r = 1
|
33
|
-
r = 1
|
32
|
+
r = 1 %#{' '}
|
33
|
+
r = 1 %#{' '}
|
34
34
|
++++
|
35
35
|
|
36
36
|
[stem]
|
@@ -38,17 +38,17 @@ end
|
|
38
38
|
<mml:math><mml:msub xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math"> <mml:mrow> <mml:mrow> <mml:mi mathvariant="bold-italic">F</mml:mi> </mml:mrow> </mml:mrow> <mml:mrow> <mml:mrow> <mml:mi mathvariant="bold-italic">Α</mml:mi> </mml:mrow> </mml:mrow> </mml:msub> </mml:math>
|
39
39
|
++++
|
40
40
|
INPUT
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
41
|
+
#{@blank_hdr}
|
42
|
+
<sections>
|
43
|
+
<formula id="_">
|
44
|
+
<stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>r</mi><mo>=</mo><mn>1</mn><mi>%</mi><mi>r</mi><mo>=</mo><mn>1</mn><mi>%</mi></math></stem>
|
45
|
+
</formula>
|
46
|
+
|
47
|
+
<formula id="_">
|
48
|
+
<stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub> <mrow> <mrow> <mi mathvariant="bold-italic">F</mi> </mrow> </mrow> <mrow> <mrow> <mi mathvariant="bold-italic">Α</mi> </mrow> </mrow> </msub> </math></stem>
|
49
|
+
</formula>
|
50
|
+
</sections>
|
51
|
+
</bsi-standard>
|
52
52
|
OUTPUT
|
53
53
|
end
|
54
54
|
|
@@ -65,13 +65,13 @@ end
|
|
65
65
|
|
66
66
|
For further information on the Foreword, see *ISO/IEC Directives, Part 2, 2016, Clause 12.*
|
67
67
|
****
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
68
|
+
INPUT
|
69
|
+
#{@blank_hdr}
|
70
|
+
<sections><p id="foreword">Foreword</p>
|
71
|
+
</sections>
|
72
|
+
</bsi-standard>
|
73
|
+
OUTPUT
|
74
|
+
end
|
75
75
|
|
76
76
|
it "processes review blocks if document is in draft mode" do
|
77
77
|
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :bsi, header_footer: true)).sub(/^.+<sections>/m, "<sections>").sub(%r{</sections>.*$}m, "</sections>"))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
@@ -93,13 +93,13 @@ end
|
|
93
93
|
|
94
94
|
For further information on the Foreword, see *ISO/IEC Directives, Part 2, 2016, Clause 12.*
|
95
95
|
****
|
96
|
-
|
96
|
+
INPUT
|
97
97
|
<sections>
|
98
98
|
<p id="foreword">Foreword</p>
|
99
99
|
<review reviewer="ISO" id="_" date="20170101T00:00:00Z" from="foreword" to="foreword"><p id="_">A Foreword shall appear in each document. The generic text is shown here. It does not contain requirements, recommendations or permissions.</p>
|
100
100
|
<p id="_">For further information on the Foreword, see <strong>ISO/IEC Directives, Part 2, 2016, Clause 12.</strong></p></review></sections>
|
101
101
|
|
102
|
-
|
102
|
+
OUTPUT
|
103
103
|
end
|
104
104
|
|
105
105
|
it "processes term notes" do
|
@@ -110,40 +110,40 @@ end
|
|
110
110
|
=== Term1
|
111
111
|
|
112
112
|
NOTE: This is a note
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
113
|
+
INPUT
|
114
|
+
#{@blank_hdr}
|
115
|
+
<sections>
|
116
|
+
<terms id="_" obligation="normative">
|
117
|
+
<title>Terms and definitions</title>
|
118
|
+
<p id="_">For the purposes of this British Standard, the following terms and definitions apply.</p>
|
119
|
+
#{TERMS_BOILERPLATE}
|
120
|
+
<term id="term-term1">
|
121
|
+
<preferred>Term1</preferred>
|
122
|
+
<termnote id="_">
|
123
|
+
<p id="_">This is a note</p>
|
124
|
+
</termnote>
|
125
|
+
</term>
|
126
|
+
</terms>
|
127
|
+
</sections>
|
128
|
+
</bsi-standard>
|
129
|
+
OUTPUT
|
130
130
|
end
|
131
131
|
|
132
132
|
it "processes notes" do
|
133
133
|
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :bsi, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
134
134
|
#{ASCIIDOC_BLANK_HDR}
|
135
135
|
NOTE: This is a note
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
136
|
+
INPUT
|
137
|
+
#{@blank_hdr}
|
138
|
+
<sections>
|
139
|
+
<note id="_">
|
140
|
+
<p id="_">This is a note</p>
|
141
|
+
</note>
|
142
|
+
</sections>
|
143
|
+
</bsi-standard>
|
144
144
|
|
145
|
-
|
146
|
-
|
145
|
+
OUTPUT
|
146
|
+
end
|
147
147
|
|
148
148
|
it "processes literals" do
|
149
149
|
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :bsi, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
@@ -151,90 +151,90 @@ end
|
|
151
151
|
....
|
152
152
|
LITERAL
|
153
153
|
....
|
154
|
-
|
155
|
-
|
156
|
-
<sections>
|
157
|
-
|
158
|
-
|
159
|
-
</figure>
|
160
|
-
</sections>
|
161
|
-
</bsi-standard>
|
162
|
-
|
163
|
-
|
164
|
-
|
154
|
+
INPUT
|
155
|
+
#{@blank_hdr}
|
156
|
+
<sections>
|
157
|
+
<figure id="_">
|
158
|
+
<pre id="_">LITERAL</pre>
|
159
|
+
</figure>
|
160
|
+
</sections>
|
161
|
+
</bsi-standard>
|
162
|
+
OUTPUT
|
163
|
+
end
|
165
164
|
|
166
165
|
it "processes commentaries" do
|
167
166
|
input = <<~INPUT
|
168
|
-
|
169
|
-
|
170
|
-
|
167
|
+
#{ASCIIDOC_BLANK_HDR}
|
168
|
+
[[reag]]
|
169
|
+
=== Reagents
|
171
170
|
|
172
|
-
|
173
|
-
|
171
|
+
[NOTE,type=commentary,target=reag]
|
172
|
+
This is a commentary on the reagents
|
174
173
|
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
174
|
+
[[table1]]
|
175
|
+
.Reagents in use
|
176
|
+
|===
|
177
|
+
| A | B
|
178
|
+
|===
|
180
179
|
|
181
|
-
|
182
|
-
|
180
|
+
[[reag2]]
|
181
|
+
=== Reagents
|
183
182
|
|
184
|
-
|
185
|
-
|
183
|
+
[NOTE,type=commentary]
|
184
|
+
This is a commentary on the reagents
|
186
185
|
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
186
|
+
[[table1]]
|
187
|
+
.Reagents in use
|
188
|
+
|===
|
189
|
+
| A | B
|
190
|
+
|===
|
192
191
|
|
193
|
-
|
192
|
+
INPUT
|
194
193
|
|
195
194
|
expect(xmlpp(strip_guid(
|
196
|
-
Nokogiri::XML(Asciidoctor.convert(input, backend: :bsi, header_footer: true)).at("//xmlns:sections").to_xml
|
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
|
-
|
195
|
+
Nokogiri::XML(Asciidoctor.convert(input, backend: :bsi, header_footer: true)).at("//xmlns:sections").to_xml
|
196
|
+
)))
|
197
|
+
.to be_equivalent_to xmlpp(<<~"OUTPUT")
|
198
|
+
<sections>
|
199
|
+
<clause id='reag' inline-header='false' obligation='normative'>
|
200
|
+
<title>Reagents</title>
|
201
|
+
<admonition id='_' type='commentary' target='reag'>
|
202
|
+
<p id='_'>This is a commentary on the reagents</p>
|
203
|
+
</admonition>
|
204
|
+
<table id='table1'>
|
205
|
+
<name>Reagents in use</name>
|
206
|
+
<tbody>
|
207
|
+
<tr>
|
208
|
+
<td valign='top' align='left'>A</td>
|
209
|
+
<td valign='top' align='left'>B</td>
|
210
|
+
</tr>
|
211
|
+
</tbody>
|
212
|
+
</table>
|
213
|
+
</clause>
|
214
|
+
<clause id='reag2' inline-header='false' obligation='normative'>
|
215
|
+
<title>Reagents</title>
|
216
|
+
<admonition id='_' type='commentary' target='reag2'>
|
217
|
+
<p id='_'>This is a commentary on the reagents</p>
|
218
|
+
</admonition>
|
219
|
+
<table id='table1'>
|
220
|
+
<name>Reagents in use</name>
|
221
|
+
<tbody>
|
222
|
+
<tr>
|
223
|
+
<td valign='top' align='left'>A</td>
|
224
|
+
<td valign='top' align='left'>B</td>
|
225
|
+
</tr>
|
226
|
+
</tbody>
|
227
|
+
</table>
|
228
|
+
</clause>
|
229
|
+
</sections>
|
230
|
+
OUTPUT
|
231
|
+
end
|
232
232
|
|
233
233
|
it "processes simple admonitions with Asciidoc names" do
|
234
|
-
|
234
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :bsi, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
235
235
|
#{ASCIIDOC_BLANK_HDR}
|
236
236
|
CAUTION: Only use paddy or parboiled rice for the determination of husked rice yield.
|
237
|
-
|
237
|
+
INPUT
|
238
238
|
#{@blank_hdr}
|
239
239
|
<sections>
|
240
240
|
<admonition id="_" type="caution">
|
@@ -243,12 +243,11 @@ Nokogiri::XML(Asciidoctor.convert(input, backend: :bsi, header_footer: true)).at
|
|
243
243
|
</sections>
|
244
244
|
</bsi-standard>
|
245
245
|
|
246
|
-
|
247
|
-
|
248
|
-
|
246
|
+
OUTPUT
|
247
|
+
end
|
249
248
|
|
250
249
|
it "processes complex admonitions with non-Asciidoc names" do
|
251
|
-
|
250
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :bsi, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
252
251
|
#{ASCIIDOC_BLANK_HDR}
|
253
252
|
[CAUTION,type=Safety Precautions]
|
254
253
|
.Safety Precautions
|
@@ -259,7 +258,7 @@ Nokogiri::XML(Asciidoctor.convert(input, backend: :bsi, header_footer: true)).at
|
|
259
258
|
. More than two glasses of orange juice in 24 hours makes them howl in harmony with alarms and sirens.
|
260
259
|
. Celery makes them sad.
|
261
260
|
====
|
262
|
-
|
261
|
+
INPUT
|
263
262
|
#{@blank_hdr}
|
264
263
|
<sections>
|
265
264
|
<admonition id="_" type="safety precautions"><name>Safety Precautions</name><p id="_">While werewolves are hardy community members, keep in mind the following dietary concerns:</p>
|
@@ -277,11 +276,11 @@ Nokogiri::XML(Asciidoctor.convert(input, backend: :bsi, header_footer: true)).at
|
|
277
276
|
</sections>
|
278
277
|
</bsi-standard>
|
279
278
|
|
280
|
-
|
281
|
-
|
279
|
+
OUTPUT
|
280
|
+
end
|
282
281
|
|
283
|
-
|
284
|
-
|
282
|
+
it "processes term examples" do
|
283
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :bsi, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
285
284
|
#{ASCIIDOC_BLANK_HDR}
|
286
285
|
== Terms and Definitions
|
287
286
|
|
@@ -289,7 +288,7 @@ Nokogiri::XML(Asciidoctor.convert(input, backend: :bsi, header_footer: true)).at
|
|
289
288
|
|
290
289
|
[example]
|
291
290
|
This is an example
|
292
|
-
|
291
|
+
INPUT
|
293
292
|
#{@blank_hdr}
|
294
293
|
<sections>
|
295
294
|
<terms id="_" obligation="normative">
|
@@ -306,11 +305,11 @@ Nokogiri::XML(Asciidoctor.convert(input, backend: :bsi, header_footer: true)).at
|
|
306
305
|
</sections>
|
307
306
|
</bsi-standard>
|
308
307
|
|
309
|
-
|
310
|
-
|
308
|
+
OUTPUT
|
309
|
+
end
|
311
310
|
|
312
|
-
|
313
|
-
|
311
|
+
it "processes examples" do
|
312
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :bsi, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
314
313
|
#{ASCIIDOC_BLANK_HDR}
|
315
314
|
[example]
|
316
315
|
====
|
@@ -318,42 +317,42 @@ Nokogiri::XML(Asciidoctor.convert(input, backend: :bsi, header_footer: true)).at
|
|
318
317
|
|
319
318
|
Amen
|
320
319
|
====
|
321
|
-
|
320
|
+
INPUT
|
322
321
|
#{@blank_hdr}
|
323
322
|
<sections>
|
324
323
|
<example id="_"><p id="_">This is an example</p>
|
325
324
|
<p id="_">Amen</p></example>
|
326
325
|
</sections>
|
327
326
|
</bsi-standard>
|
328
|
-
|
329
|
-
|
327
|
+
OUTPUT
|
328
|
+
end
|
330
329
|
|
331
|
-
|
332
|
-
|
330
|
+
it "processes preambles" do
|
331
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :bsi, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
333
332
|
#{ASCIIDOC_BLANK_HDR}
|
334
333
|
This is a preamble
|
335
334
|
|
336
335
|
== Section 1
|
337
|
-
|
336
|
+
INPUT
|
338
337
|
#{@blank_hdr}
|
339
338
|
<preface><foreword id="_" obligation="informative">
|
340
|
-
<title>
|
339
|
+
<title>Foreword</title>
|
341
340
|
<p id="_">This is a preamble</p>
|
342
341
|
</foreword></preface><sections>
|
343
342
|
<clause id="_" inline-header="false" obligation="normative">
|
344
343
|
<title>Section 1</title>
|
345
344
|
</clause></sections>
|
346
345
|
</bsi-standard>
|
347
|
-
|
348
|
-
|
346
|
+
OUTPUT
|
347
|
+
end
|
349
348
|
|
350
|
-
|
351
|
-
|
349
|
+
it "processes images" do
|
350
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :bsi, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
352
351
|
#{ASCIIDOC_BLANK_HDR}
|
353
352
|
.Split-it-right sample divider
|
354
353
|
image::spec/examples/rice_images/rice_image1.png[]
|
355
354
|
|
356
|
-
|
355
|
+
INPUT
|
357
356
|
#{@blank_hdr}
|
358
357
|
<sections>
|
359
358
|
<figure id="_">
|
@@ -362,16 +361,16 @@ Nokogiri::XML(Asciidoctor.convert(input, backend: :bsi, header_footer: true)).at
|
|
362
361
|
</figure>
|
363
362
|
</sections>
|
364
363
|
</bsi-standard>
|
365
|
-
|
366
|
-
|
364
|
+
OUTPUT
|
365
|
+
end
|
367
366
|
|
368
|
-
|
369
|
-
|
367
|
+
it "accepts width and height attributes on images" do
|
368
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :bsi, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
370
369
|
#{ASCIIDOC_BLANK_HDR}
|
371
370
|
[height=4,width=3]
|
372
371
|
image::spec/examples/rice_images/rice_image1.png[]
|
373
372
|
|
374
|
-
|
373
|
+
INPUT
|
375
374
|
#{@blank_hdr}
|
376
375
|
<sections>
|
377
376
|
<figure id="_">
|
@@ -379,16 +378,16 @@ Nokogiri::XML(Asciidoctor.convert(input, backend: :bsi, header_footer: true)).at
|
|
379
378
|
</figure>
|
380
379
|
</sections>
|
381
380
|
</bsi-standard>
|
382
|
-
|
383
|
-
|
381
|
+
OUTPUT
|
382
|
+
end
|
384
383
|
|
385
|
-
|
386
|
-
|
384
|
+
it "accepts auto for width and height attributes on images" do
|
385
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :bsi, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
387
386
|
#{ASCIIDOC_BLANK_HDR}
|
388
387
|
[height=4,width=auto]
|
389
388
|
image::spec/examples/rice_images/rice_image1.png[]
|
390
389
|
|
391
|
-
|
390
|
+
INPUT
|
392
391
|
#{@blank_hdr}
|
393
392
|
<sections>
|
394
393
|
<figure id="_">
|
@@ -396,31 +395,31 @@ Nokogiri::XML(Asciidoctor.convert(input, backend: :bsi, header_footer: true)).at
|
|
396
395
|
</figure>
|
397
396
|
</sections>
|
398
397
|
</bsi-standard>
|
399
|
-
|
400
|
-
|
398
|
+
OUTPUT
|
399
|
+
end
|
401
400
|
|
402
|
-
|
403
|
-
|
401
|
+
it "accepts alignment attribute on paragraphs" do
|
402
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :bsi, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
404
403
|
#{ASCIIDOC_BLANK_HDR}
|
405
404
|
[align=right]
|
406
405
|
This para is right-aligned.
|
407
|
-
|
406
|
+
INPUT
|
408
407
|
#{@blank_hdr}
|
409
408
|
<sections>
|
410
409
|
<p align="right" id="_">This para is right-aligned.</p>
|
411
410
|
</sections>
|
412
411
|
</bsi-standard>
|
413
|
-
|
414
|
-
|
412
|
+
OUTPUT
|
413
|
+
end
|
415
414
|
|
416
|
-
|
417
|
-
|
415
|
+
it "processes blockquotes" do
|
416
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :bsi, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
418
417
|
#{ASCIIDOC_BLANK_HDR}
|
419
418
|
[quote, ISO, "ISO7301,section 1"]
|
420
419
|
____
|
421
420
|
Block quotation
|
422
421
|
____
|
423
|
-
|
422
|
+
INPUT
|
424
423
|
#{@blank_hdr}
|
425
424
|
<sections>
|
426
425
|
<quote id="_">
|
@@ -430,11 +429,11 @@ Nokogiri::XML(Asciidoctor.convert(input, backend: :bsi, header_footer: true)).at
|
|
430
429
|
</quote>
|
431
430
|
</sections>
|
432
431
|
</bsi-standard>
|
433
|
-
|
434
|
-
|
432
|
+
OUTPUT
|
433
|
+
end
|
435
434
|
|
436
|
-
|
437
|
-
|
435
|
+
it "processes source code" do
|
436
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :bsi, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
438
437
|
#{ASCIIDOC_BLANK_HDR}
|
439
438
|
[source,ruby]
|
440
439
|
--
|
@@ -443,7 +442,7 @@ Nokogiri::XML(Asciidoctor.convert(input, backend: :bsi, header_footer: true)).at
|
|
443
442
|
puts x
|
444
443
|
end
|
445
444
|
--
|
446
|
-
|
445
|
+
INPUT
|
447
446
|
#{@blank_hdr}
|
448
447
|
<sections>
|
449
448
|
<sourcecode lang="ruby" id="_">puts "Hello, world."
|
@@ -452,11 +451,11 @@ Nokogiri::XML(Asciidoctor.convert(input, backend: :bsi, header_footer: true)).at
|
|
452
451
|
end</sourcecode>
|
453
452
|
</sections>
|
454
453
|
</bsi-standard>
|
455
|
-
|
456
|
-
|
454
|
+
OUTPUT
|
455
|
+
end
|
457
456
|
|
458
|
-
|
459
|
-
|
457
|
+
it "processes callouts" do
|
458
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :bsi, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
460
459
|
#{ASCIIDOC_BLANK_HDR}
|
461
460
|
[source,ruby]
|
462
461
|
--
|
@@ -467,7 +466,7 @@ Nokogiri::XML(Asciidoctor.convert(input, backend: :bsi, header_footer: true)).at
|
|
467
466
|
--
|
468
467
|
<1> This is one callout
|
469
468
|
<2> This is another callout
|
470
|
-
|
469
|
+
INPUT
|
471
470
|
#{@blank_hdr}
|
472
471
|
<sections><sourcecode lang="ruby" id="_">puts "Hello, world." <callout target="_">1</callout>
|
473
472
|
%w{a b c}.each do |x|
|
@@ -479,11 +478,11 @@ Nokogiri::XML(Asciidoctor.convert(input, backend: :bsi, header_footer: true)).at
|
|
479
478
|
</annotation></sourcecode>
|
480
479
|
</sections>
|
481
480
|
</bsi-standard>
|
482
|
-
|
483
|
-
|
481
|
+
OUTPUT
|
482
|
+
end
|
484
483
|
|
485
|
-
|
486
|
-
|
484
|
+
it "processes unmodified term sources" do
|
485
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :bsi, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
487
486
|
#{ASCIIDOC_BLANK_HDR}
|
488
487
|
== Terms and Definitions
|
489
488
|
|
@@ -491,7 +490,7 @@ Nokogiri::XML(Asciidoctor.convert(input, backend: :bsi, header_footer: true)).at
|
|
491
490
|
|
492
491
|
[.source]
|
493
492
|
<<ISO2191,section=1>>
|
494
|
-
|
493
|
+
INPUT
|
495
494
|
#{@blank_hdr}
|
496
495
|
<sections>
|
497
496
|
<terms id="_" obligation="normative">
|
@@ -511,11 +510,11 @@ Nokogiri::XML(Asciidoctor.convert(input, backend: :bsi, header_footer: true)).at
|
|
511
510
|
</terms>
|
512
511
|
</sections>
|
513
512
|
</bsi-standard>
|
514
|
-
|
515
|
-
|
513
|
+
OUTPUT
|
514
|
+
end
|
516
515
|
|
517
|
-
|
518
|
-
|
516
|
+
it "processes modified term sources" do
|
517
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :bsi, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
519
518
|
#{ASCIIDOC_BLANK_HDR}
|
520
519
|
== Terms and Definitions
|
521
520
|
|
@@ -523,7 +522,7 @@ Nokogiri::XML(Asciidoctor.convert(input, backend: :bsi, header_footer: true)).at
|
|
523
522
|
|
524
523
|
[.source]
|
525
524
|
<<ISO2191,section=1>>, with adjustments
|
526
|
-
|
525
|
+
INPUT
|
527
526
|
#{@blank_hdr}
|
528
527
|
<sections>
|
529
528
|
<terms id="_" obligation="normative">
|
@@ -546,8 +545,6 @@ Nokogiri::XML(Asciidoctor.convert(input, backend: :bsi, header_footer: true)).at
|
|
546
545
|
</terms>
|
547
546
|
</sections>
|
548
547
|
</bsi-standard>
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
548
|
+
OUTPUT
|
549
|
+
end
|
553
550
|
end
|