metanorma-standoc 1.9.2 → 1.10.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/rake.yml +3 -13
  3. data/.hound.yml +3 -1
  4. data/.rubocop.yml +4 -6
  5. data/lib/asciidoctor/standoc/base.rb +3 -1
  6. data/lib/asciidoctor/standoc/biblio.rng +1 -0
  7. data/lib/asciidoctor/standoc/blocks.rb +1 -1
  8. data/lib/asciidoctor/standoc/cleanup.rb +34 -15
  9. data/lib/asciidoctor/standoc/cleanup_block.rb +0 -1
  10. data/lib/asciidoctor/standoc/cleanup_boilerplate.rb +2 -2
  11. data/lib/asciidoctor/standoc/cleanup_footnotes.rb +0 -1
  12. data/lib/asciidoctor/standoc/cleanup_inline.rb +117 -77
  13. data/lib/asciidoctor/standoc/cleanup_maths.rb +0 -1
  14. data/lib/asciidoctor/standoc/cleanup_ref.rb +7 -0
  15. data/lib/asciidoctor/standoc/cleanup_section.rb +73 -137
  16. data/lib/asciidoctor/standoc/cleanup_section_names.rb +75 -0
  17. data/lib/asciidoctor/standoc/cleanup_terms.rb +19 -18
  18. data/lib/asciidoctor/standoc/converter.rb +1 -0
  19. data/lib/asciidoctor/standoc/front.rb +1 -2
  20. data/lib/asciidoctor/standoc/front_contributor.rb +66 -42
  21. data/lib/asciidoctor/standoc/inline.rb +45 -34
  22. data/lib/asciidoctor/standoc/isodoc.rng +66 -10
  23. data/lib/asciidoctor/standoc/macros.rb +7 -5
  24. data/lib/asciidoctor/standoc/macros_plantuml.rb +21 -23
  25. data/lib/asciidoctor/standoc/macros_terms.rb +60 -23
  26. data/lib/asciidoctor/standoc/section.rb +19 -12
  27. data/lib/asciidoctor/standoc/term_lookup_cleanup.rb +87 -33
  28. data/lib/asciidoctor/standoc/terms.rb +1 -1
  29. data/lib/asciidoctor/standoc/utils.rb +0 -1
  30. data/lib/asciidoctor/standoc/validate.rb +22 -8
  31. data/lib/isodoc/html/html_titlepage.html +81 -0
  32. data/lib/isodoc/html/htmlstyle.css +983 -0
  33. data/lib/isodoc/html/htmlstyle.scss +714 -0
  34. data/lib/isodoc/html/scripts.html +71 -0
  35. data/lib/metanorma/standoc/processor.rb +16 -7
  36. data/lib/metanorma/standoc/version.rb +1 -1
  37. data/metanorma-standoc.gemspec +3 -3
  38. data/spec/asciidoctor/base_spec.rb +697 -557
  39. data/spec/asciidoctor/blocks_spec.rb +6 -8
  40. data/spec/asciidoctor/cleanup_sections_spec.rb +14 -14
  41. data/spec/asciidoctor/cleanup_spec.rb +899 -688
  42. data/spec/asciidoctor/inline_spec.rb +62 -14
  43. data/spec/asciidoctor/isobib_cache_spec.rb +4 -6
  44. data/spec/asciidoctor/lists_spec.rb +149 -137
  45. data/spec/asciidoctor/macros_json2text_spec.rb +1 -1
  46. data/spec/asciidoctor/macros_plantuml_spec.rb +8 -8
  47. data/spec/asciidoctor/macros_spec.rb +646 -169
  48. data/spec/asciidoctor/refs_dl_spec.rb +4 -4
  49. data/spec/asciidoctor/refs_spec.rb +1527 -1532
  50. data/spec/asciidoctor/section_spec.rb +58 -22
  51. data/spec/asciidoctor/table_spec.rb +6 -6
  52. data/spec/asciidoctor/validate_spec.rb +352 -304
  53. data/spec/spec_helper.rb +2 -0
  54. data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec.yml +49 -49
  55. data/spec/vcr_cassettes/isobib_get_123.yml +12 -12
  56. data/spec/vcr_cassettes/isobib_get_123_1.yml +27 -27
  57. data/spec/vcr_cassettes/isobib_get_123_1_fr.yml +35 -35
  58. data/spec/vcr_cassettes/isobib_get_123_2001.yml +14 -14
  59. data/spec/vcr_cassettes/isobib_get_124.yml +14 -14
  60. data/spec/vcr_cassettes/rfcbib_get_rfc8341.yml +14 -14
  61. data/spec/vcr_cassettes/separates_iev_citations_by_top_level_clause.yml +44 -44
  62. metadata +12 -11
  63. data/lib/liquid/custom_blocks/key_iterator.rb +0 -21
  64. data/lib/liquid/custom_blocks/with_json_nested_context.rb +0 -18
  65. data/lib/liquid/custom_blocks/with_yaml_nested_context.rb +0 -19
  66. data/lib/liquid/custom_filters/values.rb +0 -7
@@ -1,6 +1,6 @@
1
1
  require "spec_helper"
2
2
 
3
- RSpec.describe 'Json2Text macros' do
3
+ RSpec.describe "Json2Text macros" do
4
4
  it_behaves_like "structured data 2 text preprocessor" do
5
5
  let(:extention) { "json" }
6
6
  def transform_to_type(data)
@@ -2,7 +2,7 @@ require "spec_helper"
2
2
 
3
3
  RSpec.describe Asciidoctor::Standoc do
4
4
  it "processes the PlantUML macro" do
5
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)).gsub(%r{plantuml/plantuml[^./]+\.}, "plantuml/_."))).to be_equivalent_to xmlpp(<<~"OUTPUT")
5
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)).gsub(%r{plantuml/plantuml[^./]+\.}, "plantuml/_."))).to be_equivalent_to xmlpp(<<~"OUTPUT")
6
6
  #{ASCIIDOC_BLANK_HDR}
7
7
 
8
8
  [plantuml]
@@ -53,7 +53,7 @@ RSpec.describe Asciidoctor::Standoc do
53
53
  end
54
54
 
55
55
  it "processes the PlantUML macro with imagesdir" do
56
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)).gsub(%r{spec/assets/[^./]+\.}, "spec/assets/_."))).to be_equivalent_to xmlpp(<<~"OUTPUT")
56
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)).gsub(%r{spec/assets/[^./]+\.}, "spec/assets/_."))).to be_equivalent_to xmlpp(<<~"OUTPUT")
57
57
  = Document title
58
58
  Author
59
59
  :docfile: test.adoc
@@ -119,7 +119,7 @@ OUTPUT
119
119
  it "processes the lutaml_diagram" do
120
120
  expect(
121
121
  xmlpp(
122
- strip_guid(Asciidoctor.convert(input, backend: :standoc, header_footer: true))
122
+ strip_guid(Asciidoctor.convert(input, *OPTIONS))
123
123
  .gsub(%r{".+spec\/assets\/lutaml\/[^.\/]+\.}, %q("spec/assets/_.))))
124
124
  .to(be_equivalent_to xmlpp(output))
125
125
  end
@@ -187,14 +187,14 @@ OUTPUT
187
187
  it "processes the lutaml_uml_attributes_table macro" do
188
188
  expect(
189
189
  xmlpp(
190
- strip_guid(Asciidoctor.convert(input, backend: :standoc, header_footer: true))))
190
+ strip_guid(Asciidoctor.convert(input, *OPTIONS))))
191
191
  .to(be_equivalent_to(xmlpp(output)))
192
192
  end
193
193
  end
194
194
 
195
195
  it "processes the PlantUML macro with PlantUML disabled" do
196
196
  mock_plantuml_disabled
197
- expect { Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true) }.to output(%r{PlantUML not installed}).to_stderr
197
+ expect { Asciidoctor.convert(<<~"INPUT", *OPTIONS) }.to output(%r{PlantUML not installed}).to_stderr
198
198
  #{ASCIIDOC_BLANK_HDR}
199
199
 
200
200
  [plantuml]
@@ -210,7 +210,7 @@ OUTPUT
210
210
  INPUT
211
211
 
212
212
  mock_plantuml_disabled
213
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
213
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
214
214
  #{ASCIIDOC_BLANK_HDR}
215
215
 
216
216
  [plantuml]
@@ -240,7 +240,7 @@ Alice &lt;-- Bob: another authentication Response
240
240
 
241
241
  it "processes the PlantUML macro with localdir unwritable" do
242
242
  mock_localdir_unwritable
243
- expect { Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true) }.to output(%r{not writable for PlantUML}).to_stderr
243
+ expect { Asciidoctor.convert(<<~"INPUT", *OPTIONS) }.to output(%r{not writable for PlantUML}).to_stderr
244
244
  #{ASCIIDOC_BLANK_HDR}
245
245
 
246
246
  [plantuml]
@@ -256,7 +256,7 @@ Alice &lt;-- Bob: another authentication Response
256
256
  INPUT
257
257
 
258
258
  mock_localdir_unwritable
259
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
259
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
260
260
  #{ASCIIDOC_BLANK_HDR}
261
261
 
262
262
  [plantuml]
@@ -2,7 +2,7 @@ require "spec_helper"
2
2
 
3
3
  RSpec.describe Asciidoctor::Standoc do
4
4
  it "processes the Asciidoctor::Standoc inline macros" do
5
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
5
+ input = <<~INPUT
6
6
  #{ASCIIDOC_BLANK_HDR}
7
7
  alt:[term1]
8
8
  deprecated:[term1]
@@ -15,6 +15,7 @@ RSpec.describe Asciidoctor::Standoc do
15
15
  == Bibliography
16
16
  * [[[ref1,XYZ 123]]] _Title_
17
17
  INPUT
18
+ output = <<~OUTPUT
18
19
  #{BLANK_HDR}
19
20
  <preface>
20
21
  <foreword id='_' obligation='informative'>
@@ -48,10 +49,12 @@ RSpec.describe Asciidoctor::Standoc do
48
49
  </bibliography>
49
50
  </standard-document>
50
51
  OUTPUT
52
+ expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
53
+ .to be_equivalent_to xmlpp(output)
51
54
  end
52
55
 
53
56
  it "processes the Asciidoctor::Standoc index macros" do
54
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
57
+ input = <<~INPUT
55
58
  #{ASCIIDOC_BLANK_HDR}
56
59
  index:also[]
57
60
  index:see[A]
@@ -67,6 +70,7 @@ RSpec.describe Asciidoctor::Standoc do
67
70
 
68
71
  Text [[id3]]
69
72
  INPUT
73
+ output = <<~OUTPUT
70
74
  #{BLANK_HDR}
71
75
  <sections>
72
76
  <p id='_'>
@@ -117,16 +121,19 @@ RSpec.describe Asciidoctor::Standoc do
117
121
  </sections>
118
122
  </standard-document>
119
123
  OUTPUT
124
+ expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
125
+ .to be_equivalent_to xmlpp(output)
120
126
  end
121
127
 
122
128
  it "processes the Asciidoctor::Standoc variant macros" do
123
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
129
+ input = <<~INPUT
124
130
  #{ASCIIDOC_BLANK_HDR}
125
131
  == lang:en[English] lang:fr-Latn[Français]
126
132
 
127
133
  this lang:en[English] lang:fr-Latn[Français] section is lang:en[silly] lang:fr[fou]
128
134
 
129
135
  INPUT
136
+ output = <<~OUTPUT
130
137
  #{BLANK_HDR}
131
138
  <sections>
132
139
  <clause id='_' inline-header='false' obligation='normative'>
@@ -150,134 +157,142 @@ RSpec.describe Asciidoctor::Standoc do
150
157
  </sections>
151
158
  </standard-document>
152
159
  OUTPUT
160
+ expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
161
+ .to be_equivalent_to xmlpp(output)
153
162
  end
154
163
 
155
164
  it "processes the Asciidoctor::Standoc concept macros" do
156
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
165
+ input = <<~INPUT
157
166
  #{ASCIIDOC_BLANK_HDR}
158
167
  {{clause1}}
168
+ term:[clause1]
159
169
  {{clause1,w\[o\]rd}}
170
+ term:[clause1,w[o&#93;rd]
160
171
  {{clause1,w\[o\]rd,term}}
161
172
  {{blah}}
173
+ term:[blah]
162
174
  {{blah,word}}
163
- {{blah,word,term}}
164
- {{blah,clause=3.1}}
165
- {{blah,clause=3.1,word}}
166
- {{blah,clause=3.1,word,term}}
167
- {{blah,clause=3.1,figure=a}}
168
- {{blah,clause=3.1,figure=a,word}}
169
- {{blah,clause=3.1,figure=a,word,term}}
170
- {{IEV:135-13-13}}
171
- {{IEV:135-13-13,word}}
172
- {{IEV:135-13-13,word,term}}
175
+ term:[blah,word]
176
+ {{blah,term,word}}
177
+ {{blah,term,word,xref}}
178
+ {{blah,term,word,xref,option="noital,noref"}}
173
179
 
174
180
  [[clause1]]
175
181
  == Clause
176
182
  Terms are defined here
177
-
178
- [bibliography]
179
- == Bibliography
180
- * [[[blah,blah]]] _Blah_
181
183
  INPUT
184
+ output = <<~OUTPUT
182
185
  #{BLANK_HDR}
183
186
  <preface>
184
187
  <foreword id='_' obligation='informative'>
185
188
  <title>Foreword</title>
186
189
  <p id='_'>
187
- <concept>
188
- <xref target='clause1'/>
189
- </concept>
190
- <concept>
191
- <xref target='clause1'>w[o]rd</xref>
192
- </concept>
193
- <concept term='term'>
194
- <xref target='clause1'>w[o]rd</xref>
195
- </concept>
196
- <concept>
197
- <eref/>
198
- </concept>
199
- <concept>
200
- <eref>word</eref>
201
- </concept>
202
- <concept term='term'>
203
- <eref>word</eref>
204
- </concept>
205
- <concept>
206
- <eref>
207
- <localityStack>
208
- <locality type='clause'>
209
- <referenceFrom>3.1</referenceFrom>
210
- </locality>
211
- </localityStack>
212
- </eref>
213
- </concept>
214
- <concept>
215
- <eref>
216
- <localityStack>
217
- <locality type='clause'>
218
- <referenceFrom>3.1</referenceFrom>
219
- </locality>
220
- </localityStack>
221
- word
222
- </eref>
223
- </concept>
224
- <concept term='term'>
225
- <eref>
226
- <localityStack>
227
- <locality type='clause'>
228
- <referenceFrom>3.1</referenceFrom>
229
- </locality>
230
- </localityStack>
231
- word
232
- </eref>
233
- </concept>
234
- <concept>
235
- <eref>
236
- <localityStack>
237
- <locality type='clause'>
238
- <referenceFrom>3.1</referenceFrom>
239
- </locality>
240
- <locality type='figure'>
241
- <referenceFrom>a</referenceFrom>
242
- </locality>
243
- </localityStack>
244
- </eref>
245
- </concept>
246
- <concept>
247
- <eref>
248
- <localityStack>
249
- <locality type='clause'>
250
- <referenceFrom>3.1</referenceFrom>
251
- </locality>
252
- <locality type='figure'>
253
- <referenceFrom>a</referenceFrom>
254
- </locality>
255
- </localityStack>
256
- word
257
- </eref>
258
- </concept>
259
- <concept term='term'>
260
- <eref>
261
- <localityStack>
262
- <locality type='clause'>
263
- <referenceFrom>3.1</referenceFrom>
264
- </locality>
265
- <locality type='figure'>
266
- <referenceFrom>a</referenceFrom>
267
- </locality>
268
- </localityStack>
269
- word
270
- </eref>
271
- </concept>
272
- <concept>
273
- <termref base='IEV' target='135-13-13'/>
274
- </concept>
275
- <concept>
276
- <termref base='IEV' target='135-13-13'>word</termref>
277
- </concept>
278
- <concept term='term'>
279
- <termref base='IEV' target='135-13-13'>word</termref>
280
- </concept>
190
+ <concept>
191
+ <strong>
192
+ term
193
+ <tt>clause1</tt>
194
+ not resolved via ID
195
+ <tt>clause1</tt>
196
+ </strong>
197
+ </concept>
198
+ <concept>
199
+ <strong>
200
+ term
201
+ <tt>clause1</tt>
202
+ not resolved via ID
203
+ <tt>clause1</tt>
204
+ </strong>
205
+ </concept>
206
+ <concept>
207
+ <strong>
208
+ term
209
+ <tt>clause1</tt>, display <tt>w[o]rd</tt>
210
+ not resolved via ID
211
+ <tt>clause1</tt>
212
+ </strong>
213
+ </concept>
214
+ <concept>
215
+ <strong>
216
+ term
217
+ <tt>clause1</tt>, display <tt>w[o]rd</tt>
218
+ not resolved via ID
219
+ <tt>clause1</tt>
220
+ </strong>
221
+ </concept>
222
+ <concept>
223
+ <strong>
224
+ term
225
+ <tt>clause1</tt>, display <tt>w[o]rd</tt>
226
+ not resolved via ID
227
+ <tt>clause1</tt>
228
+ </strong>
229
+ </concept>
230
+ <concept>
231
+ <strong>
232
+ term
233
+ <tt>blah</tt>
234
+ not resolved via ID
235
+ <tt>blah</tt>
236
+ </strong>
237
+ </concept>
238
+ <concept>
239
+ <strong>
240
+ term
241
+ <tt>blah</tt>
242
+ not resolved via ID
243
+ <tt>blah</tt>
244
+ </strong>
245
+ </concept>
246
+ <concept>
247
+ <strong>
248
+ term
249
+ <tt>blah</tt>
250
+ , display
251
+ <tt>word</tt>
252
+ not resolved via ID
253
+ <tt>blah</tt>
254
+ </strong>
255
+ </concept>
256
+ <concept>
257
+ <strong>
258
+ term
259
+ <tt>blah</tt>
260
+ , display
261
+ <tt>word</tt>
262
+ not resolved via ID
263
+ <tt>blah</tt>
264
+ </strong>
265
+ </concept>
266
+ <concept>
267
+ <strong>
268
+ term
269
+ <tt>blah</tt>
270
+ , display
271
+ <tt>term</tt>
272
+ not resolved via ID
273
+ <tt>blah</tt>
274
+ </strong>
275
+ </concept>
276
+ <concept>
277
+ <strong>
278
+ term
279
+ <tt>blah</tt>
280
+ , display
281
+ <tt>term</tt>
282
+ not resolved via ID
283
+ <tt>blah</tt>
284
+ </strong>
285
+ </concept>
286
+ <concept ital='false' ref='false'>
287
+ <strong>
288
+ term
289
+ <tt>blah</tt>
290
+ , display
291
+ <tt>term</tt>
292
+ not resolved via ID
293
+ <tt>blah</tt>
294
+ </strong>
295
+ </concept>
281
296
  </p>
282
297
  </foreword>
283
298
  </preface>
@@ -287,23 +302,369 @@ RSpec.describe Asciidoctor::Standoc do
287
302
  <p id='_'>Terms are defined here</p>
288
303
  </clause>
289
304
  </sections>
290
- <bibliography>
291
- <references id='_' obligation='informative' normative="false">
292
- <title>Bibliography</title>
293
- <bibitem id='blah'>
294
- <formattedref format='application/x-isodoc+xml'>
295
- <em>Blah</em>
296
- </formattedref>
297
- <docidentifier>blah</docidentifier>
298
- </bibitem>
299
- </references>
300
- </bibliography>
301
305
  </standard-document>
302
306
  OUTPUT
307
+ expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
308
+ .to be_equivalent_to xmlpp(output)
309
+ end
310
+
311
+ it "processes the Asciidoctor::Standoc concept macros for acronyms" do
312
+ input = <<~INPUT
313
+ #{ASCIIDOC_BLANK_HDR}
314
+ {{Clause1}}
315
+ {{Clause1,Clause 1}}
316
+ {{Clause 2}}
317
+ {{Clause 2,Clause 1}}
318
+ {{<<Clause2>>,Clause 2}}
319
+ symbol:[Clause1]
320
+ symbol:[Clause1,word]
321
+ symbol:[Clause 2]
322
+ symbol:[Clause 2,word]
323
+ {{<<Clause2>>,word}}
324
+ {{<<Clause2>>,word,term}}
325
+ {{<<Clause2>>,word,term,xref}}
326
+ {{<<Clause2>>,word,term,xref,option="noital,noref"}}
327
+ {{<<Clause2>>,word,term,xref,option="ital,ref"}}
328
+
329
+ == Terms and definitions
330
+ === Clause1
331
+ == Symbols and Abbreviated Terms
332
+ Clause1:: A
333
+ [[Clause2]]Clause 2:: C
334
+ INPUT
335
+ output = <<~OUTPUT
336
+ #{BLANK_HDR}
337
+ <preface>
338
+ <foreword id='_' obligation='informative'>
339
+ <title>Foreword</title>
340
+ <p id='_'>
341
+ <concept>
342
+ <refterm>Clause1</refterm>
343
+ <renderterm>Clause1</renderterm>
344
+ <xref target='term-clause1'/>
345
+ </concept>
346
+ <concept>
347
+ <refterm>Clause1</refterm>
348
+ <renderterm>Clause 1</renderterm>
349
+ <xref target='term-clause1'/>
350
+ </concept>
351
+ <concept>
352
+ <refterm>Clause 2</refterm>
353
+ <renderterm>Clause 2</renderterm>
354
+ <xref target='Clause2'/>
355
+ </concept>
356
+ <concept>
357
+ <refterm>Clause 2</refterm>
358
+ <renderterm>Clause 1</renderterm>
359
+ <xref target='Clause2'/>
360
+ </concept>
361
+ <concept>
362
+ <refterm>Clause 2</refterm>
363
+ <renderterm>Clause 2</renderterm>
364
+ <xref target='Clause2'/>
365
+ </concept>
366
+ <concept>
367
+ <refterm>Clause1</refterm>
368
+ <renderterm>Clause1</renderterm>
369
+ <xref target='symbol-clause1'/>
370
+ </concept>
371
+ <concept>
372
+ <refterm>Clause1</refterm>
373
+ <renderterm>word</renderterm>
374
+ <xref target='symbol-clause1'/>
375
+ </concept>
376
+ <concept>
377
+ <refterm>Clause 2</refterm>
378
+ <renderterm>Clause 2</renderterm>
379
+ <xref target='Clause2'/>
380
+ </concept>
381
+ <concept>
382
+ <refterm>Clause 2</refterm>
383
+ <renderterm>word</renderterm>
384
+ <xref target='Clause2'/>
385
+ </concept>
386
+ <concept>
387
+ <refterm>word</refterm>
388
+ <renderterm>word</renderterm>
389
+ <xref target='Clause2'/>
390
+ </concept>
391
+ <concept>
392
+ <refterm>word</refterm>
393
+ <renderterm>term</renderterm>
394
+ <xref target='Clause2'/>
395
+ </concept>
396
+ <concept>
397
+ <refterm>word</refterm>
398
+ <renderterm>term</renderterm>
399
+ <xref target='Clause2'>xref</xref>
400
+ </concept>
401
+ <concept ital='false' ref='false'>
402
+ <refterm>word</refterm>
403
+ <renderterm>term</renderterm>
404
+ <xref target='Clause2'>xref</xref>
405
+ </concept>
406
+ <concept ital='true' ref='true'>
407
+ <refterm>word</refterm>
408
+ <renderterm>term</renderterm>
409
+ <xref target='Clause2'>xref</xref>
410
+ </concept>
411
+ </p>
412
+ </foreword>
413
+ </preface>
414
+ <sections>
415
+ <terms id='_' obligation='normative'>
416
+ <title>Terms and definitions</title>
417
+ <p id='_'>For the purposes of this document, the following terms and definitions apply.</p>
418
+ <term id='term-clause1'>
419
+ <preferred>Clause1</preferred>
420
+ </term>
421
+ </terms>
422
+ <definitions id='_' obligation='normative'>
423
+ <title>Symbols and abbreviated terms</title>
424
+ <dl id='_'>
425
+ <dt id="symbol-clause1">Clause1</dt>
426
+ <dd>
427
+ <p id='_'>A</p>
428
+ </dd>
429
+ <dt id='Clause2'>Clause 2</dt>
430
+ <dd>
431
+ <p id='_'>C</p>
432
+ </dd>
433
+ </dl>
434
+ </definitions>
435
+ </sections>
436
+ </standard-document>
437
+ OUTPUT
438
+ expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
439
+ .to be_equivalent_to xmlpp(output)
440
+ end
441
+
442
+ it "processes the concept macros with xrefs" do
443
+ input = <<~INPUT
444
+ #{ASCIIDOC_BLANK_HDR}
445
+ {{<<clause1>>}}
446
+ {{<<clause1>>,w\[o\]rd}}
447
+ {{<<clause1>>,term,w\[o\]rd}}
448
+ {{<<clause1>>,term,w\[o\]rd,Clause #1}}
449
+
450
+ [[clause1]]
451
+ == Clause
452
+ Terms are defined here
453
+ INPUT
454
+ output = <<~OUTPUT
455
+ #{BLANK_HDR}
456
+ <preface>
457
+ <foreword id='_' obligation='informative'>
458
+ <title>Foreword</title>
459
+ <p id='_'>
460
+ <concept>
461
+ <xref target='clause1'/>
462
+ </concept>
463
+ <concept>
464
+ <refterm>w[o]rd</refterm>
465
+ <renderterm>w[o]rd</renderterm>
466
+ <xref target='clause1'/>
467
+ </concept>
468
+ <concept>
469
+ <refterm>term</refterm>
470
+ <renderterm>w[o]rd</renderterm>
471
+ <xref target='clause1'/>
472
+ </concept>
473
+ <concept>
474
+ <refterm>term</refterm>
475
+ <renderterm>w[o]rd</renderterm>
476
+ <xref target='clause1'>Clause #1</xref>
477
+ </concept>
478
+ </p>
479
+ </foreword>
480
+ </preface>
481
+ <sections>
482
+ <clause id='clause1' inline-header='false' obligation='normative'>
483
+ <title>Clause</title>
484
+ <p id='_'>Terms are defined here</p>
485
+ </clause>
486
+ </sections>
487
+ </standard-document>
488
+ OUTPUT
489
+ expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
490
+ .to be_equivalent_to xmlpp(output)
491
+ end
492
+
493
+ it "processes the concept macros with erefs" do
494
+ input = <<~INPUT
495
+ #{ASCIIDOC_BLANK_HDR}
496
+ {{<<blah>>}}
497
+ {{<<blah>>,word}}
498
+ {{<<blah>>,term,word}}
499
+ {{<<blah>>,term,word,Clause #1}}
500
+ {{<<blah,clause=3.1>>}}
501
+ {{<<blah,clause=3.1>>,word}}
502
+ {{<<blah,clause=3.1>>,term,word}}
503
+ {{<<blah,clause=3.1,figure=a>>}}
504
+ {{<<blah,clause=3.1,figure=a>>,word}}
505
+ {{<<blah,clause=3.1,figure=a>>,term,word,Clause #1}}
506
+
507
+ [bibliography]
508
+ == Bibliography
509
+ * [[[blah,blah]]] _Blah_
510
+ INPUT
511
+ output = <<~OUTPUT
512
+ #{BLANK_HDR}
513
+ <preface>
514
+ <foreword id='_' obligation='informative'>
515
+ <title>Foreword</title>
516
+ <p id='_'>
517
+ <concept>
518
+ <eref bibitemid='blah'/>
519
+ </concept>
520
+ <concept>
521
+ <refterm>word</refterm>
522
+ <renderterm>word</renderterm>
523
+ <eref bibitemid='blah'/>
524
+ </concept>
525
+ <concept>
526
+ <refterm>term</refterm>
527
+ <renderterm>word</renderterm>
528
+ <eref bibitemid='blah'/>
529
+ </concept>
530
+ <concept>
531
+ <refterm>term</refterm>
532
+ <renderterm>word</renderterm>
533
+ <eref bibitemid='blah'>Clause #1</eref>
534
+ </concept>
535
+ <concept>
536
+ <eref bibitemid='blah'>
537
+ <localityStack>
538
+ <locality type='clause'>
539
+ <referenceFrom>3.1</referenceFrom>
540
+ </locality>
541
+ </localityStack>
542
+ </eref>
543
+ </concept>
544
+ <concept>
545
+ <refterm>word</refterm>
546
+ <renderterm>word</renderterm>
547
+ <eref bibitemid='blah'>
548
+ <localityStack>
549
+ <locality type='clause'>
550
+ <referenceFrom>3.1</referenceFrom>
551
+ </locality>
552
+ </localityStack>
553
+ </eref>
554
+ </concept>
555
+ <concept>
556
+ <refterm>term</refterm>
557
+ <renderterm>word</renderterm>
558
+ <eref bibitemid='blah'>
559
+ <localityStack>
560
+ <locality type='clause'>
561
+ <referenceFrom>3.1</referenceFrom>
562
+ </locality>
563
+ </localityStack>
564
+ </eref>
565
+ </concept>
566
+ <concept>
567
+ <eref bibitemid='blah'>
568
+ <localityStack>
569
+ <locality type='clause'>
570
+ <referenceFrom>3.1</referenceFrom>
571
+ </locality>
572
+ <locality type='figure'>
573
+ <referenceFrom>a</referenceFrom>
574
+ </locality>
575
+ </localityStack>
576
+ </eref>
577
+ </concept>
578
+ <concept>
579
+ <refterm>word</refterm>
580
+ <renderterm>word</renderterm>
581
+ <eref bibitemid='blah'>
582
+ <localityStack>
583
+ <locality type='clause'>
584
+ <referenceFrom>3.1</referenceFrom>
585
+ </locality>
586
+ <locality type='figure'>
587
+ <referenceFrom>a</referenceFrom>
588
+ </locality>
589
+ </localityStack>
590
+ </eref>
591
+ </concept>
592
+ <concept>
593
+ <refterm>term</refterm>
594
+ <renderterm>word</renderterm>
595
+ <eref bibitemid='blah'>
596
+ <localityStack>
597
+ <locality type='clause'>
598
+ <referenceFrom>3.1</referenceFrom>
599
+ </locality>
600
+ <locality type='figure'>
601
+ <referenceFrom>a</referenceFrom>
602
+ </locality>
603
+ </localityStack>
604
+ Clause #1
605
+ </eref>
606
+ </concept>
607
+ </p>
608
+ </foreword>
609
+ </preface>
610
+ <sections> </sections>
611
+ <bibliography>
612
+ <references id='_' normative='false' obligation='informative'>
613
+ <title>Bibliography</title>
614
+ <bibitem id='blah'>
615
+ <formattedref format='application/x-isodoc+xml'>
616
+ <em>Blah</em>
617
+ </formattedref>
618
+ <docidentifier>blah</docidentifier>
619
+ </bibitem>
620
+ </references>
621
+ </bibliography>
622
+ </standard-document>
623
+ OUTPUT
624
+ expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
625
+ .to be_equivalent_to xmlpp(output)
626
+ end
627
+
628
+ it "processes the concept macros with termbase" do
629
+ input = <<~INPUT
630
+ #{ASCIIDOC_BLANK_HDR}
631
+ {{<<IEV:135-13-13>>}}
632
+ {{<<IEV:135-13-13>>,word}}
633
+ {{<<IEV:135-13-13>>,term,word}}
634
+ {{<<IEV:135-13-13>>,term,word,Clause #1}}
635
+ INPUT
636
+ output = <<~OUTPUT
637
+ #{BLANK_HDR}
638
+ <sections>
639
+ <p id='_'>
640
+ <concept>
641
+ <termref base='IEV' target='135-13-13'/>
642
+ </concept>
643
+ <concept>
644
+ <refterm>word</refterm>
645
+ <renderterm>word</renderterm>
646
+ <termref base='IEV' target='135-13-13'/>
647
+ </concept>
648
+ <concept>
649
+ <refterm>term</refterm>
650
+ <renderterm>word</renderterm>
651
+ <termref base='IEV' target='135-13-13'/>
652
+ </concept>
653
+ <concept>
654
+ <refterm>term</refterm>
655
+ <renderterm>word</renderterm>
656
+ <termref base='IEV' target='135-13-13'>Clause #1</termref>
657
+ </concept>
658
+ </p>
659
+ </sections>
660
+ </standard-document>
661
+ OUTPUT
662
+ expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
663
+ .to be_equivalent_to xmlpp(output)
303
664
  end
304
665
 
305
666
  it "processes the TODO custom admonition" do
306
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
667
+ input = <<~INPUT
307
668
  #{ASCIIDOC_BLANK_HDR}
308
669
  TODO: Note1
309
670
 
@@ -315,6 +676,7 @@ RSpec.describe Asciidoctor::Standoc do
315
676
  [TODO]
316
677
  Note3
317
678
  INPUT
679
+ output = <<~OUTPUT
318
680
  #{BLANK_HDR}
319
681
  <sections><review reviewer="(Unknown)" id="_" date="#{Date.today}T00:00:00Z">
320
682
  <p id="_"/>
@@ -327,10 +689,12 @@ RSpec.describe Asciidoctor::Standoc do
327
689
  </review></sections>
328
690
  </standard-document>
329
691
  OUTPUT
692
+ expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
693
+ .to be_equivalent_to xmlpp(output)
330
694
  end
331
695
 
332
696
  it "generates pseudocode examples, with formatting and initial indentation" do
333
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
697
+ input = <<~INPUT
334
698
  #{ASCIIDOC_BLANK_HDR}
335
699
 
336
700
  [pseudocode,subsequence="A",number="3",keep-with-next=true,keep-lines-together=true]
@@ -342,6 +706,7 @@ RSpec.describe Asciidoctor::Standoc do
342
706
  _C_
343
707
  ====
344
708
  INPUT
709
+ output = <<~OUTPUT
345
710
  #{BLANK_HDR}
346
711
  <sections>
347
712
  <figure id="_" subsequence='A' class="pseudocode" unnumbered="true" number="3" keep-with-next="true" keep-lines-together="true">
@@ -351,10 +716,12 @@ RSpec.describe Asciidoctor::Standoc do
351
716
  </sections>
352
717
  </standard-document>
353
718
  OUTPUT
719
+ expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
720
+ .to be_equivalent_to xmlpp(output)
354
721
  end
355
722
 
356
723
  it "supplies line breaks in pseudocode" do
357
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
724
+ input = <<~INPUT
358
725
  #{ASCIIDOC_BLANK_HDR}
359
726
 
360
727
  [pseudocode]
@@ -366,6 +733,7 @@ RSpec.describe Asciidoctor::Standoc do
366
733
  E
367
734
  ====
368
735
  INPUT
736
+ output = <<~OUTPUT
369
737
  #{BLANK_HDR}
370
738
  <sections>
371
739
  <figure id='_' class='pseudocode'>
@@ -383,10 +751,12 @@ RSpec.describe Asciidoctor::Standoc do
383
751
  </sections>
384
752
  </standard-document>
385
753
  OUTPUT
754
+ expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
755
+ .to be_equivalent_to xmlpp(output)
386
756
  end
387
757
 
388
758
  it "skips embedded blocks when supplying line breaks in pseudocode" do
389
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
759
+ input = <<~INPUT
390
760
  #{ASCIIDOC_BLANK_HDR}
391
761
 
392
762
  [pseudocode]
@@ -397,6 +767,7 @@ RSpec.describe Asciidoctor::Standoc do
397
767
  ++++
398
768
  ====
399
769
  INPUT
770
+ output = <<~OUTPUT
400
771
  #{BLANK_HDR}
401
772
  <sections>
402
773
  <figure id='_' class='pseudocode'>
@@ -449,14 +820,17 @@ RSpec.describe Asciidoctor::Standoc do
449
820
  </sections>
450
821
  </standard-document>
451
822
  OUTPUT
823
+ expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
824
+ .to be_equivalent_to xmlpp(output)
452
825
  end
453
826
 
454
827
  it "processes the Ruby markups" do
455
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
828
+ input = <<~INPUT
456
829
  #{ASCIIDOC_BLANK_HDR}
457
830
 
458
831
  ruby:楽聖少女[がくせいしょうじょ]
459
832
  INPUT
833
+ output = <<~OUTPUT
460
834
  #{BLANK_HDR}
461
835
  <sections>
462
836
  <p id="_">
@@ -465,10 +839,12 @@ RSpec.describe Asciidoctor::Standoc do
465
839
  </sections>
466
840
  </standard-document>
467
841
  OUTPUT
842
+ expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
843
+ .to be_equivalent_to xmlpp(output)
468
844
  end
469
845
 
470
846
  it "processes the footnoteblock macro" do
471
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
847
+ input = <<~INPUT
472
848
  #{ASCIIDOC_BLANK_HDR}
473
849
 
474
850
  footnoteblock:[id1]
@@ -487,6 +863,7 @@ RSpec.describe Asciidoctor::Standoc do
487
863
  * C
488
864
  --
489
865
  INPUT
866
+ output = <<~OUTPUT
490
867
  #{BLANK_HDR}
491
868
  <sections>
492
869
  <p id="_">
@@ -521,10 +898,12 @@ RSpec.describe Asciidoctor::Standoc do
521
898
  </sections>
522
899
  </standard-document>
523
900
  OUTPUT
901
+ expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
902
+ .to be_equivalent_to xmlpp(output)
524
903
  end
525
904
 
526
905
  it "processes the footnoteblock macro with failed reference" do
527
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
906
+ input = <<~INPUT
528
907
  #{ASCIIDOC_BLANK_HDR}
529
908
 
530
909
  footnoteblock:[id1]
@@ -543,6 +922,7 @@ RSpec.describe Asciidoctor::Standoc do
543
922
  * C
544
923
  --
545
924
  INPUT
925
+ output = <<~OUTPUT
546
926
  #{BLANK_HDR}
547
927
  <sections>
548
928
  <p id='_'>
@@ -578,13 +958,15 @@ RSpec.describe Asciidoctor::Standoc do
578
958
  </sections>
579
959
  </standard-document>
580
960
  OUTPUT
961
+ expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
962
+ .to be_equivalent_to xmlpp(output)
581
963
  end
582
964
 
583
965
  it "processes input form macros" do
584
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
966
+ input = <<~INPUT
585
967
  #{ASCIIDOC_BLANK_HDR}
586
968
 
587
- [form,id=N0,name=N1,action="/action_page.php"]
969
+ [form,id=N0,name=N1,action="/action_page.php",class="checkboxes"]
588
970
  --
589
971
  label:fname[First name:] +
590
972
  input:text[id=fname,name=fname] +
@@ -619,9 +1001,10 @@ RSpec.describe Asciidoctor::Standoc do
619
1001
  input:submit[value="Submit"]
620
1002
  --
621
1003
  INPUT
1004
+ output = <<~OUTPUT
622
1005
  #{BLANK_HDR}
623
1006
  <sections>
624
- <form id='_' name='N1' action='/action_page.php'>
1007
+ <form id='_' name='N1' action='/action_page.php' class="checkboxes">
625
1008
  <p id='_'>
626
1009
  <label for='fname'>First name:</label>
627
1010
  <br/>
@@ -675,6 +1058,8 @@ RSpec.describe Asciidoctor::Standoc do
675
1058
  </sections>
676
1059
  </standard-document>
677
1060
  OUTPUT
1061
+ expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
1062
+ .to be_equivalent_to xmlpp(output)
678
1063
  end
679
1064
 
680
1065
  describe "term inline macros" do
@@ -682,9 +1067,9 @@ RSpec.describe Asciidoctor::Standoc do
682
1067
  xmlpp(
683
1068
  strip_guid(
684
1069
  Asciidoctor.convert(
685
- input, backend: :standoc, header_footer: true
686
- )
687
- )
1070
+ input, *OPTIONS
1071
+ ),
1072
+ ),
688
1073
  )
689
1074
  end
690
1075
  let(:input) do
@@ -692,11 +1077,13 @@ RSpec.describe Asciidoctor::Standoc do
692
1077
  #{ASCIIDOC_BLANK_HDR}
693
1078
  == Terms and Definitions
694
1079
 
695
- === name2
1080
+ === name
696
1081
 
697
1082
  == Main
698
1083
 
699
1084
  term:[name,name2] is a term
1085
+
1086
+ {{name,name2}} is a term
700
1087
  XML
701
1088
  end
702
1089
  let(:output) do
@@ -706,17 +1093,27 @@ RSpec.describe Asciidoctor::Standoc do
706
1093
  <terms id='_' obligation='normative'>
707
1094
  <title>Terms and definitions</title>
708
1095
  <p id='_'>For the purposes of this document, the following terms and definitions apply.</p>
709
- <term id='term-name2'>
710
- <preferred>name2</preferred>
1096
+ <term id='term-name'>
1097
+ <preferred>name</preferred>
711
1098
  </term>
712
1099
  </terms>
713
1100
  <clause id='_' inline-header='false' obligation='normative'>
714
1101
  <title>Main</title>
715
1102
  <p id='_'>
716
- <em>name</em>
717
- (
718
- <xref target='term-name2'/>
719
- ) is a term
1103
+ <concept>
1104
+ <refterm>name</refterm>
1105
+ <renderterm>name2</renderterm>
1106
+ <xref target='term-name'/>
1107
+ </concept>
1108
+ is a term
1109
+ </p>
1110
+ <p id='_'>
1111
+ <concept>
1112
+ <refterm>name</refterm>
1113
+ <renderterm>name2</renderterm>
1114
+ <xref target='term-name'/>
1115
+ </concept>
1116
+ is a term
720
1117
  </p>
721
1118
  </clause>
722
1119
  </sections>
@@ -740,6 +1137,8 @@ RSpec.describe Asciidoctor::Standoc do
740
1137
  == Main
741
1138
 
742
1139
  term:[name] is a term
1140
+
1141
+ {{name}} is a term
743
1142
  XML
744
1143
  end
745
1144
  let(:output) do
@@ -756,10 +1155,20 @@ RSpec.describe Asciidoctor::Standoc do
756
1155
  <clause id='_' inline-header='false' obligation='normative'>
757
1156
  <title>Main</title>
758
1157
  <p id='_'>
759
- <em>name</em>
760
- (
761
- <xref target='term-name' />
762
- ) is a term
1158
+ <concept>
1159
+ <refterm>name</refterm>
1160
+ <renderterm>name</renderterm>
1161
+ <xref target='term-name'/>
1162
+ </concept>
1163
+ is a term
1164
+ </p>
1165
+ <p id='_'>
1166
+ <concept>
1167
+ <refterm>name</refterm>
1168
+ <renderterm>name</renderterm>
1169
+ <xref target='term-name'/>
1170
+ </concept>
1171
+ is a term
763
1172
  </p>
764
1173
  </clause>
765
1174
  </sections>
@@ -792,6 +1201,8 @@ RSpec.describe Asciidoctor::Standoc do
792
1201
 
793
1202
  term:[name] is a term
794
1203
  term:[name2] is a term
1204
+ {{name}} is a term
1205
+ {{name2}} is a term
795
1206
  XML
796
1207
  end
797
1208
  let(:output) do
@@ -815,14 +1226,30 @@ RSpec.describe Asciidoctor::Standoc do
815
1226
  <clause id='term-name2' inline-header='false' obligation='normative'>
816
1227
  <title>Second</title>
817
1228
  <p id='_'>
818
- <em>name</em>
819
- (
820
- <xref target='term-name-1' />
821
- ) is a term
822
- <em>name2</em>
823
- (
824
- <xref target='term-name2-1' />
825
- ) is a term
1229
+ <concept>
1230
+ <refterm>name</refterm>
1231
+ <renderterm>name</renderterm>
1232
+ <xref target='term-name-1'/>
1233
+ </concept>
1234
+ is a term
1235
+ <concept>
1236
+ <refterm>name2</refterm>
1237
+ <renderterm>name2</renderterm>
1238
+ <xref target='term-name2-1'/>
1239
+ </concept>
1240
+ is a term
1241
+ <concept>
1242
+ <refterm>name</refterm>
1243
+ <renderterm>name</renderterm>
1244
+ <xref target='term-name-1'/>
1245
+ </concept>
1246
+ is a term
1247
+ <concept>
1248
+ <refterm>name2</refterm>
1249
+ <renderterm>name2</renderterm>
1250
+ <xref target='term-name2-1'/>
1251
+ </concept>
1252
+ is a term
826
1253
  </p>
827
1254
  </clause>
828
1255
  </sections>
@@ -854,12 +1281,19 @@ RSpec.describe Asciidoctor::Standoc do
854
1281
  term:[name identity] is a term
855
1282
 
856
1283
  Moreover, term:[missing] is a term
1284
+
1285
+
1286
+ {{name check}} is a term
1287
+
1288
+ {{name identity}} is a term
1289
+
1290
+ Moreover, {{missing}} is a term
857
1291
  XML
858
1292
  end
859
1293
  let(:output) do
860
1294
  <<~XML
861
- #{BLANK_HDR}
862
- <sections>
1295
+ #{BLANK_HDR}
1296
+ <sections>
863
1297
  <terms id='_' obligation='normative'>
864
1298
  <title>Terms and definitions</title>
865
1299
  <p id='_'>For the purposes of this document, the following terms and definitions apply.</p>
@@ -871,18 +1305,61 @@ RSpec.describe Asciidoctor::Standoc do
871
1305
  <definition>
872
1306
  <p id='_'>paragraph</p>
873
1307
  <p id='_'>
874
- <em>name check</em>
875
- (
876
- <xref target='name-check'/>
877
- ) is a term
878
- </p>
879
- <p id='_'>
880
- <em>name identity</em>
881
- (
882
- <xref target='term-name-identity'/>
883
- ) is a term
884
- </p>
885
- <p id="_">Moreover, (<strong>term “missing” not resolved</strong>) is a term</p>
1308
+ <concept>
1309
+ <refterm>name check</refterm>
1310
+ <renderterm>name check</renderterm>
1311
+ <xref target='name-check'/>
1312
+ </concept>
1313
+ is a term
1314
+ </p>
1315
+ <p id='_'>
1316
+ <concept>
1317
+ <refterm>name identity</refterm>
1318
+ <renderterm>name identity</renderterm>
1319
+ <xref target='term-name-identity'/>
1320
+ </concept>
1321
+ is a term
1322
+ </p>
1323
+ <p id='_'>
1324
+ Moreover,
1325
+ <concept>
1326
+ <strong>
1327
+ term
1328
+ <tt>missing</tt>
1329
+ not resolved via ID
1330
+ <tt>missing</tt>
1331
+ </strong>
1332
+ </concept>
1333
+ is a term
1334
+ </p>
1335
+ <p id='_'>
1336
+ <concept>
1337
+ <refterm>name check</refterm>
1338
+ <renderterm>name check</renderterm>
1339
+ <xref target='name-check'/>
1340
+ </concept>
1341
+ is a term
1342
+ </p>
1343
+ <p id='_'>
1344
+ <concept>
1345
+ <refterm>name identity</refterm>
1346
+ <renderterm>name identity</renderterm>
1347
+ <xref target='term-name-identity'/>
1348
+ </concept>
1349
+ is a term
1350
+ </p>
1351
+ <p id='_'>
1352
+ Moreover,
1353
+ <concept>
1354
+ <strong>
1355
+ term
1356
+ <tt>missing</tt>
1357
+ not resolved via ID
1358
+ <tt>missing</tt>
1359
+ </strong>
1360
+ </concept>
1361
+ is a term
1362
+ </p>
886
1363
  </definition>
887
1364
  </term>
888
1365
  </terms>