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.

Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/rake.yml +43 -0
  3. data/.github/workflows/release_github_packages.yml +49 -0
  4. data/.hound.yml +3 -1
  5. data/.rubocop.yml +4 -8
  6. data/README.adoc +95 -11
  7. data/lib/asciidoctor/bsi/biblio.rng +1 -0
  8. data/lib/asciidoctor/bsi/bsi.rng +32 -4
  9. data/lib/asciidoctor/bsi/bsi_intro_en.xml +87 -61
  10. data/lib/asciidoctor/bsi/cleanup.rb +15 -8
  11. data/lib/asciidoctor/bsi/cleanup_ref.rb +10 -21
  12. data/lib/asciidoctor/bsi/converter.rb +7 -5
  13. data/lib/asciidoctor/bsi/front.rb +26 -5
  14. data/lib/asciidoctor/bsi/isodoc.rng +191 -3
  15. data/lib/asciidoctor/bsi/isostandard.rng +12 -0
  16. data/lib/asciidoctor/bsi/validate.rb +5 -6
  17. data/lib/asciidoctor/bsi/validate_list.rb +2 -2
  18. data/lib/isodoc/bsi/base_convert.rb +2 -1
  19. data/lib/isodoc/bsi/bsi.international-standard.xsl +3380 -2349
  20. data/lib/isodoc/bsi/html/htmlstyle.css +43 -22
  21. data/lib/isodoc/bsi/html/htmlstyle.scss +46 -22
  22. data/lib/isodoc/bsi/html_convert.rb +2 -2
  23. data/lib/isodoc/bsi/i18n-en.yaml +4 -4
  24. data/lib/isodoc/bsi/metadata.rb +2 -2
  25. data/lib/isodoc/bsi/presentation_xml_convert.rb +26 -5
  26. data/lib/isodoc/bsi/xref.rb +11 -4
  27. data/lib/metanorma/bsi/version.rb +1 -1
  28. data/metanorma-bsi.gemspec +2 -2
  29. data/spec/asciidoctor/base_spec.rb +564 -494
  30. data/spec/asciidoctor/blocks_spec.rb +192 -195
  31. data/spec/asciidoctor/cleanup_spec.rb +361 -361
  32. data/spec/asciidoctor/refs_spec.rb +8 -78
  33. data/spec/asciidoctor/section_spec.rb +227 -227
  34. data/spec/asciidoctor/validate_spec.rb +26 -1
  35. data/spec/isodoc/blocks_spec.rb +56 -21
  36. data/spec/isodoc/i18n_spec.rb +156 -234
  37. data/spec/isodoc/inline_spec.rb +7 -7
  38. data/spec/isodoc/iso_spec.rb +4 -4
  39. data/spec/isodoc/metadata_spec.rb +0 -1
  40. data/spec/isodoc/ref_spec.rb +7 -7
  41. data/spec/isodoc/section_spec.rb +400 -343
  42. data/spec/isodoc/terms_spec.rb +224 -225
  43. data/spec/isodoc/xref_spec.rb +1347 -1360
  44. data/spec/metanorma/processor_spec.rb +37 -40
  45. data/spec/spec_helper.rb +6 -4
  46. data/spec/vcr_cassettes/iso-639.yml +19 -19
  47. data/spec/vcr_cassettes/isobib_get_639_1967.yml +17 -17
  48. data/spec/vcr_cassettes/multistandard.yml +15 -193
  49. 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
- @blank_hdr = blank_hdr_gen
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
- #{@blank_hdr}
20
- <sections><p id="_">x</p>
21
- <p id="_">y</p>
22
- <p id="_">z</p></sections>
23
- </bsi-standard>
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">&#x0391;</mml:mi> </mml:mrow> </mml:mrow> </mml:msub> </mml:math>
39
39
  ++++
40
40
  INPUT
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>
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
- INPUT
69
- #{@blank_hdr}
70
- <sections><p id="foreword">Foreword</p>
71
- </sections>
72
- </bsi-standard>
73
- OUTPUT
74
- end
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
- INPUT
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
- OUTPUT
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
- 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
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
- INPUT
137
- #{@blank_hdr}
138
- <sections>
139
- <note id="_">
140
- <p id="_">This is a note</p>
141
- </note>
142
- </sections>
143
- </bsi-standard>
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
- OUTPUT
146
- end
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
- 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
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
- #{ASCIIDOC_BLANK_HDR}
169
- [[reag]]
170
- === Reagents
167
+ #{ASCIIDOC_BLANK_HDR}
168
+ [[reag]]
169
+ === Reagents
171
170
 
172
- [NOTE,type=commentary,target=reag]
173
- This is a commentary on the reagents
171
+ [NOTE,type=commentary,target=reag]
172
+ This is a commentary on the reagents
174
173
 
175
- [[table1]]
176
- .Reagents in use
177
- |===
178
- | A | B
179
- |===
174
+ [[table1]]
175
+ .Reagents in use
176
+ |===
177
+ | A | B
178
+ |===
180
179
 
181
- [[reag2]]
182
- === Reagents
180
+ [[reag2]]
181
+ === Reagents
183
182
 
184
- [NOTE,type=commentary]
185
- This is a commentary on the reagents
183
+ [NOTE,type=commentary]
184
+ This is a commentary on the reagents
186
185
 
187
- [[table1]]
188
- .Reagents in use
189
- |===
190
- | A | B
191
- |===
186
+ [[table1]]
187
+ .Reagents in use
188
+ |===
189
+ | A | B
190
+ |===
192
191
 
193
- INPUT
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
- .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
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
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :bsi, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
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
- INPUT
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
- OUTPUT
247
- end
248
-
246
+ OUTPUT
247
+ end
249
248
 
250
249
  it "processes complex admonitions with non-Asciidoc names" do
251
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :bsi, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
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
- INPUT
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
- OUTPUT
281
- end
279
+ OUTPUT
280
+ end
282
281
 
283
- it "processes term examples" do
284
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :bsi, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
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
- INPUT
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
- OUTPUT
310
- end
308
+ OUTPUT
309
+ end
311
310
 
312
- it "processes examples" do
313
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :bsi, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
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
- INPUT
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
- OUTPUT
329
- end
327
+ OUTPUT
328
+ end
330
329
 
331
- it "processes preambles" do
332
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :bsi, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
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
- INPUT
336
+ INPUT
338
337
  #{@blank_hdr}
339
338
  <preface><foreword id="_" obligation="informative">
340
- <title>FOREWORD</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
- OUTPUT
348
- end
346
+ OUTPUT
347
+ end
349
348
 
350
- it "processes images" do
351
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :bsi, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
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
- INPUT
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
- OUTPUT
366
- end
364
+ OUTPUT
365
+ end
367
366
 
368
- it "accepts width and height attributes on images" do
369
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :bsi, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
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
- INPUT
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
- OUTPUT
383
- end
381
+ OUTPUT
382
+ end
384
383
 
385
- it "accepts auto for width and height attributes on images" do
386
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :bsi, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
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
- INPUT
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
- OUTPUT
400
- end
398
+ OUTPUT
399
+ end
401
400
 
402
- it "accepts alignment attribute on paragraphs" do
403
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :bsi, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
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
- INPUT
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
- OUTPUT
414
- end
412
+ OUTPUT
413
+ end
415
414
 
416
- it "processes blockquotes" do
417
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :bsi, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
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
- INPUT
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
- OUTPUT
434
- end
432
+ OUTPUT
433
+ end
435
434
 
436
- it "processes source code" do
437
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :bsi, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
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
- INPUT
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
- OUTPUT
456
- end
454
+ OUTPUT
455
+ end
457
456
 
458
- it "processes callouts" do
459
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :bsi, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
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
- INPUT
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
- OUTPUT
483
- end
481
+ OUTPUT
482
+ end
484
483
 
485
- it "processes unmodified term sources" do
486
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :bsi, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
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
- INPUT
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
- OUTPUT
515
- end
513
+ OUTPUT
514
+ end
516
515
 
517
- it "processes modified term sources" do
518
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :bsi, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
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
- INPUT
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
- OUTPUT
550
- end
551
-
552
-
548
+ OUTPUT
549
+ end
553
550
  end