metanorma-standoc 1.10.7 → 1.11.1
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/README.adoc +19 -23
- data/Rakefile +1 -1
- data/lib/asciidoctor/standoc/base.rb +7 -4
- data/lib/asciidoctor/standoc/basicdoc.rng +21 -4
- data/lib/asciidoctor/standoc/blocks.rb +23 -23
- data/lib/asciidoctor/standoc/blocks_notes.rb +17 -22
- data/lib/asciidoctor/standoc/cleanup.rb +20 -11
- data/lib/asciidoctor/standoc/cleanup_image.rb +6 -7
- data/lib/asciidoctor/standoc/cleanup_inline.rb +45 -7
- data/lib/asciidoctor/standoc/cleanup_maths.rb +5 -6
- data/lib/asciidoctor/standoc/cleanup_ref.rb +5 -0
- data/lib/asciidoctor/standoc/cleanup_reqt.rb +2 -21
- data/lib/asciidoctor/standoc/cleanup_symbols.rb +48 -0
- data/lib/asciidoctor/standoc/cleanup_terms.rb +48 -77
- data/lib/asciidoctor/standoc/cleanup_terms_designations.rb +162 -0
- data/lib/asciidoctor/standoc/cleanup_text.rb +23 -0
- data/lib/asciidoctor/standoc/converter.rb +2 -0
- data/lib/asciidoctor/standoc/inline.rb +7 -5
- data/lib/asciidoctor/standoc/isodoc.rng +420 -76
- data/lib/asciidoctor/standoc/lists.rb +14 -16
- data/lib/asciidoctor/standoc/macros_plantuml.rb +29 -14
- data/lib/asciidoctor/standoc/macros_terms.rb +55 -8
- data/lib/asciidoctor/standoc/ref.rb +1 -1
- data/lib/asciidoctor/standoc/ref_sect.rb +26 -18
- data/lib/asciidoctor/standoc/reqt.rng +23 -2
- data/lib/asciidoctor/standoc/section.rb +13 -12
- data/lib/asciidoctor/standoc/term_lookup_cleanup.rb +50 -11
- data/lib/asciidoctor/standoc/terms.rb +12 -2
- data/lib/asciidoctor/standoc/utils.rb +36 -23
- data/lib/asciidoctor/standoc/validate.rb +45 -27
- data/lib/asciidoctor/standoc/validate_section.rb +5 -2
- data/lib/metanorma/standoc/version.rb +1 -1
- data/metanorma-standoc.gemspec +1 -1
- data/spec/asciidoctor/base_spec.rb +4 -3
- data/spec/asciidoctor/blocks_spec.rb +230 -49
- data/spec/asciidoctor/cleanup_sections_spec.rb +7 -7
- data/spec/asciidoctor/cleanup_spec.rb +105 -286
- data/spec/asciidoctor/cleanup_terms_spec.rb +1020 -0
- data/spec/asciidoctor/inline_spec.rb +2 -2
- data/spec/asciidoctor/lists_spec.rb +6 -6
- data/spec/asciidoctor/macros_plantuml_spec.rb +36 -1
- data/spec/asciidoctor/macros_spec.rb +190 -113
- data/spec/asciidoctor/refs_dl_spec.rb +4 -4
- data/spec/asciidoctor/refs_spec.rb +268 -108
- data/spec/asciidoctor/section_spec.rb +18 -18
- data/spec/asciidoctor/validate_spec.rb +87 -2
- data/spec/spec_helper.rb +8 -8
- data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec.yml +50 -50
- data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec1.yml +12 -12
- data/spec/vcr_cassettes/isobib_get_123.yml +13 -13
- data/spec/vcr_cassettes/isobib_get_123_1.yml +25 -25
- data/spec/vcr_cassettes/isobib_get_123_1_fr.yml +31 -31
- data/spec/vcr_cassettes/isobib_get_123_2001.yml +12 -12
- data/spec/vcr_cassettes/isobib_get_124.yml +11 -11
- data/spec/vcr_cassettes/rfcbib_get_rfc8341.yml +14 -14
- data/spec/vcr_cassettes/separates_iev_citations_by_top_level_clause.yml +45 -45
- metadata +8 -5
@@ -73,8 +73,8 @@ RSpec.describe Asciidoctor::Standoc do
|
|
73
73
|
sub<sub><em>scr</em>ipt</sub>
|
74
74
|
<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>
|
75
75
|
mark
|
76
|
-
<admitted>alt</admitted>
|
77
|
-
<deprecates>deprecated</deprecates>
|
76
|
+
<admitted><expression><name>alt</name></expression></admitted>
|
77
|
+
<deprecates><expression><name>deprecated</name></expression></deprecates>
|
78
78
|
<domain>domain</domain>
|
79
79
|
<strike>strike</strike>
|
80
80
|
<underline>underline</underline>
|
@@ -73,7 +73,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
73
73
|
output = Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
74
74
|
#{ASCIIDOC_BLANK_HDR}
|
75
75
|
[[id]]
|
76
|
-
[keep-with-next=true,keep-lines-together=true]
|
76
|
+
[keep-with-next=true,keep-lines-together=true,tag=X,multilingual-rendering=common]
|
77
77
|
* First
|
78
78
|
* Second
|
79
79
|
+
|
@@ -84,7 +84,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
84
84
|
--
|
85
85
|
|
86
86
|
[[id1]]
|
87
|
-
[keep-with-next=true,keep-lines-together=true]
|
87
|
+
[keep-with-next=true,keep-lines-together=true,tag=X,multilingual-rendering=common]
|
88
88
|
[loweralpha]
|
89
89
|
. First
|
90
90
|
. Second
|
@@ -103,7 +103,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
103
103
|
[arabic]
|
104
104
|
... E
|
105
105
|
... F
|
106
|
-
[keep-with-next=true,keep-lines-together=true]
|
106
|
+
[keep-with-next=true,keep-lines-together=true,tag=X,multilingual-rendering=common]
|
107
107
|
Notes1::
|
108
108
|
Notes:: Note 1.
|
109
109
|
+
|
@@ -117,14 +117,14 @@ RSpec.describe Asciidoctor::Standoc do
|
|
117
117
|
INPUT
|
118
118
|
expect(xmlpp(strip_guid(output))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
119
119
|
#{BLANK_HDR}
|
120
|
-
<sections><ul id="id" keep-with-next="true" keep-lines-together="true">
|
120
|
+
<sections><ul id="id" keep-with-next="true" keep-lines-together="true" tag='X' multilingual-rendering='common' >
|
121
121
|
<li>
|
122
122
|
<p id="_">First</p>
|
123
123
|
</li>
|
124
124
|
<li><p id="_">Second</p><p id="_">entry1</p>
|
125
125
|
<p id="_">entry2</p></li>
|
126
126
|
</ul>
|
127
|
-
<ol id="id1" type="alphabet" keep-with-next="true" keep-lines-together="true">
|
127
|
+
<ol id="id1" type="alphabet" keep-with-next="true" keep-lines-together="true" tag='X' multilingual-rendering='common' >
|
128
128
|
<li>
|
129
129
|
<p id="_">First</p>
|
130
130
|
</li>
|
@@ -164,7 +164,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
164
164
|
</li>
|
165
165
|
<li>
|
166
166
|
<p id="_">F</p>
|
167
|
-
<dl id="_" keep-with-next="true" keep-lines-together="true">
|
167
|
+
<dl id="_" keep-with-next="true" keep-lines-together="true" tag='X' multilingual-rendering='common'>
|
168
168
|
<dt>Notes1</dt>
|
169
169
|
<dd/>
|
170
170
|
<dt>Notes</dt>
|
@@ -64,6 +64,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
64
64
|
:novalid:
|
65
65
|
:no-isobib:
|
66
66
|
:imagesdir: spec/assets
|
67
|
+
:data-uri-image: false
|
67
68
|
|
68
69
|
[plantuml]
|
69
70
|
....
|
@@ -100,6 +101,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
100
101
|
:novalid:
|
101
102
|
:no-isobib:
|
102
103
|
:imagesdir: spec/assets
|
104
|
+
:data-uri-image: false
|
103
105
|
|
104
106
|
[lutaml_diagram]
|
105
107
|
....
|
@@ -135,7 +137,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
135
137
|
end
|
136
138
|
|
137
139
|
context "when inline macro, path supplied as the second arg" do
|
138
|
-
let(:example_file) { fixtures_path(
|
140
|
+
let(:example_file) { fixtures_path("diagram_definitions.lutaml") }
|
139
141
|
let(:input) do
|
140
142
|
<<~TEXT
|
141
143
|
= Document title
|
@@ -145,6 +147,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
145
147
|
:novalid:
|
146
148
|
:no-isobib:
|
147
149
|
:imagesdir: spec/assets
|
150
|
+
:data-uri-image: false
|
148
151
|
|
149
152
|
lutaml_diagram::#{example_file}[]
|
150
153
|
|
@@ -345,6 +348,38 @@ RSpec.describe Asciidoctor::Standoc do
|
|
345
348
|
.to be_equivalent_to xmlpp(output)
|
346
349
|
end
|
347
350
|
|
351
|
+
it "processes the PlantUML macro with mismatched delimiters" do
|
352
|
+
input = <<~INPUT
|
353
|
+
#{ASCIIDOC_BLANK_HDR}
|
354
|
+
|
355
|
+
[plantuml]
|
356
|
+
....
|
357
|
+
@startuml
|
358
|
+
Alice -> Bob: Authentication Request
|
359
|
+
Bob --> Alice: Authentication Response
|
360
|
+
|
361
|
+
Alice -> Bob: Another authentication Request
|
362
|
+
Alice <-- Bob: another authentication Response
|
363
|
+
....
|
364
|
+
INPUT
|
365
|
+
expect { Asciidoctor.convert(input, *OPTIONS) }
|
366
|
+
.to output(%r{@startuml without matching @enduml in PlantUML!}).to_stderr
|
367
|
+
output = <<~OUTPUT
|
368
|
+
#{BLANK_HDR}
|
369
|
+
<sections>
|
370
|
+
<sourcecode id="_" lang="plantuml">@startuml
|
371
|
+
Alice -> Bob: Authentication Request
|
372
|
+
Bob --> Alice: Authentication Response
|
373
|
+
|
374
|
+
Alice -> Bob: Another authentication Request
|
375
|
+
Alice <-- Bob: another authentication Response</sourcecode>
|
376
|
+
</sections>
|
377
|
+
</standard-document>
|
378
|
+
OUTPUT
|
379
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
380
|
+
.to be_equivalent_to xmlpp(output)
|
381
|
+
end
|
382
|
+
|
348
383
|
private
|
349
384
|
|
350
385
|
def mock_plantuml_disabled
|
@@ -4,9 +4,10 @@ RSpec.describe Asciidoctor::Standoc do
|
|
4
4
|
it "processes the Asciidoctor::Standoc inline macros" do
|
5
5
|
input = <<~INPUT
|
6
6
|
#{ASCIIDOC_BLANK_HDR}
|
7
|
+
preferred:[term0]
|
7
8
|
alt:[term1]
|
8
|
-
deprecated:[
|
9
|
-
domain:[
|
9
|
+
deprecated:[term2]
|
10
|
+
domain:[term3]
|
10
11
|
inherit:[<<ref1>>]
|
11
12
|
autonumber:table[3]
|
12
13
|
add:[a <<clause>>] del:[B]
|
@@ -20,9 +21,10 @@ RSpec.describe Asciidoctor::Standoc do
|
|
20
21
|
<preface>
|
21
22
|
<foreword id='_' obligation='informative'>
|
22
23
|
<title>Foreword</title>
|
23
|
-
<
|
24
|
-
<
|
25
|
-
<
|
24
|
+
<preferred><expression><name>term0</name></expression></preferred>
|
25
|
+
<admitted><expression><name>term1</name></expression></admitted>
|
26
|
+
<deprecates><expression><name>term2</name></expression></deprecates>
|
27
|
+
<domain>term3</domain>
|
26
28
|
<inherit>
|
27
29
|
<eref type='inline' bibitemid='ref1' citeas='XYZ 123'/>
|
28
30
|
</inherit>
|
@@ -161,9 +163,10 @@ RSpec.describe Asciidoctor::Standoc do
|
|
161
163
|
.to be_equivalent_to xmlpp(output)
|
162
164
|
end
|
163
165
|
|
164
|
-
it "processes the Asciidoctor::Standoc concept macros" do
|
166
|
+
it "processes the Asciidoctor::Standoc concept and related macros" do
|
165
167
|
input = <<~INPUT
|
166
168
|
#{ASCIIDOC_BLANK_HDR}
|
169
|
+
|
167
170
|
{{clause1}}
|
168
171
|
term:[clause1]
|
169
172
|
{{clause1,w\[o\]rd}}
|
@@ -178,6 +181,8 @@ RSpec.describe Asciidoctor::Standoc do
|
|
178
181
|
{{blah,term,word,xref,options="noital,noref,nolinkmention,nolinkref"}}
|
179
182
|
{{blah,term,word,xref,options="ital,ref,linkmention,linkref"}}
|
180
183
|
|
184
|
+
related:contrast[blah]
|
185
|
+
|
181
186
|
[[clause1]]
|
182
187
|
== Clause
|
183
188
|
Terms are defined here
|
@@ -304,7 +309,15 @@ RSpec.describe Asciidoctor::Standoc do
|
|
304
309
|
<tt>blah</tt>
|
305
310
|
</strong>
|
306
311
|
</concept>
|
307
|
-
|
312
|
+
</p>
|
313
|
+
<related type='contrast'>
|
314
|
+
<strong>
|
315
|
+
term
|
316
|
+
<tt>blah</tt>
|
317
|
+
not resolved via ID
|
318
|
+
<tt>blah</tt>
|
319
|
+
</strong>
|
320
|
+
</related>
|
308
321
|
</foreword>
|
309
322
|
</preface>
|
310
323
|
<sections>
|
@@ -322,15 +335,18 @@ RSpec.describe Asciidoctor::Standoc do
|
|
322
335
|
it "processes the Asciidoctor::Standoc concept macros for acronyms" do
|
323
336
|
input = <<~INPUT
|
324
337
|
#{ASCIIDOC_BLANK_HDR}
|
338
|
+
|
325
339
|
{{Clause1}}
|
326
340
|
{{Clause1,Clause 1}}
|
327
341
|
{{Clause 2}}
|
328
342
|
{{Clause 2,Clause 1}}
|
329
343
|
{{<<Clause2>>,Clause 2}}
|
344
|
+
|
330
345
|
symbol:[Clause1]
|
331
346
|
symbol:[Clause1,word]
|
332
347
|
symbol:[Clause 2]
|
333
348
|
symbol:[Clause 2,word]
|
349
|
+
|
334
350
|
{{<<Clause2>>,word}}
|
335
351
|
{{<<Clause2>>,word,term}}
|
336
352
|
{{<<Clause2>>,word,term,xref}}
|
@@ -374,6 +390,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
374
390
|
<renderterm>Clause 2</renderterm>
|
375
391
|
<xref target='Clause2'/>
|
376
392
|
</concept>
|
393
|
+
</p><p id="_">
|
377
394
|
<concept>
|
378
395
|
<refterm>Clause1</refterm>
|
379
396
|
<renderterm>Clause1</renderterm>
|
@@ -394,6 +411,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
394
411
|
<renderterm>word</renderterm>
|
395
412
|
<xref target='Clause2'/>
|
396
413
|
</concept>
|
414
|
+
</p><p id="_">
|
397
415
|
<concept>
|
398
416
|
<refterm>word</refterm>
|
399
417
|
<renderterm>word</renderterm>
|
@@ -427,7 +445,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
427
445
|
<title>Terms and definitions</title>
|
428
446
|
<p id='_'>For the purposes of this document, the following terms and definitions apply.</p>
|
429
447
|
<term id='term-clause1'>
|
430
|
-
<preferred>Clause1</preferred>
|
448
|
+
<preferred><expression><name>Clause1</name></expression></preferred>
|
431
449
|
</term>
|
432
450
|
</terms>
|
433
451
|
<definitions id='_' obligation='normative'>
|
@@ -450,7 +468,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
450
468
|
.to be_equivalent_to xmlpp(output)
|
451
469
|
end
|
452
470
|
|
453
|
-
it "processes the concept macros with xrefs" do
|
471
|
+
it "processes the concept and related macros with xrefs" do
|
454
472
|
input = <<~INPUT
|
455
473
|
#{ASCIIDOC_BLANK_HDR}
|
456
474
|
{{<<clause1>>}}
|
@@ -458,6 +476,8 @@ RSpec.describe Asciidoctor::Standoc do
|
|
458
476
|
{{<<clause1>>,term,w\[o\]rd}}
|
459
477
|
{{<<clause1>>,term,w\[o\]rd,Clause #1}}
|
460
478
|
|
479
|
+
related:supersedes[<<clause1>>,term]
|
480
|
+
|
461
481
|
[[clause1]]
|
462
482
|
== Clause
|
463
483
|
Terms are defined here
|
@@ -487,6 +507,14 @@ RSpec.describe Asciidoctor::Standoc do
|
|
487
507
|
<xref target='clause1'>Clause #1</xref>
|
488
508
|
</concept>
|
489
509
|
</p>
|
510
|
+
<related type='supersedes'>
|
511
|
+
<preferred>
|
512
|
+
<expression>
|
513
|
+
<name>term</name>
|
514
|
+
</expression>
|
515
|
+
</preferred>
|
516
|
+
<xref target='clause1'/>
|
517
|
+
</related>
|
490
518
|
</foreword>
|
491
519
|
</preface>
|
492
520
|
<sections>
|
@@ -501,7 +529,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
501
529
|
.to be_equivalent_to xmlpp(output)
|
502
530
|
end
|
503
531
|
|
504
|
-
it "processes the concept macros with erefs" do
|
532
|
+
it "processes the concept and related macros with erefs" do
|
505
533
|
input = <<~INPUT
|
506
534
|
#{ASCIIDOC_BLANK_HDR}
|
507
535
|
{{<<blah>>}}
|
@@ -515,6 +543,8 @@ RSpec.describe Asciidoctor::Standoc do
|
|
515
543
|
{{<<blah,clause=3.1,figure=a>>,word}}
|
516
544
|
{{<<blah,clause=3.1,figure=a>>,term,word,Clause #1}}
|
517
545
|
|
546
|
+
related:narrower[<<blah,clause=3.1,figure=a>>,term]
|
547
|
+
|
518
548
|
[bibliography]
|
519
549
|
== Bibliography
|
520
550
|
* [[[blah,blah]]] _Blah_
|
@@ -616,6 +646,23 @@ RSpec.describe Asciidoctor::Standoc do
|
|
616
646
|
</eref>
|
617
647
|
</concept>
|
618
648
|
</p>
|
649
|
+
<related type='narrower'>
|
650
|
+
<preferred>
|
651
|
+
<expression>
|
652
|
+
<name>term</name>
|
653
|
+
</expression>
|
654
|
+
</preferred>
|
655
|
+
<eref bibitemid='blah'>
|
656
|
+
<localityStack>
|
657
|
+
<locality type='clause'>
|
658
|
+
<referenceFrom>3.1</referenceFrom>
|
659
|
+
</locality>
|
660
|
+
<locality type='figure'>
|
661
|
+
<referenceFrom>a</referenceFrom>
|
662
|
+
</locality>
|
663
|
+
</localityStack>
|
664
|
+
</eref>
|
665
|
+
</related>
|
619
666
|
</foreword>
|
620
667
|
</preface>
|
621
668
|
<sections> </sections>
|
@@ -636,39 +683,49 @@ RSpec.describe Asciidoctor::Standoc do
|
|
636
683
|
.to be_equivalent_to xmlpp(output)
|
637
684
|
end
|
638
685
|
|
639
|
-
it "processes the concept macros with termbase" do
|
686
|
+
it "processes the concept and related macros with termbase" do
|
640
687
|
input = <<~INPUT
|
641
688
|
#{ASCIIDOC_BLANK_HDR}
|
642
689
|
{{<<IEV:135-13-13>>}}
|
643
690
|
{{<<IEV:135-13-13>>,word}}
|
644
691
|
{{<<IEV:135-13-13>>,term,word}}
|
645
692
|
{{<<IEV:135-13-13>>,term,word,Clause #1}}
|
693
|
+
|
694
|
+
related:see[<<IEV:135-13-13>>,term]
|
646
695
|
INPUT
|
647
696
|
output = <<~OUTPUT
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
697
|
+
#{BLANK_HDR}
|
698
|
+
<sections>
|
699
|
+
<p id='_'>
|
700
|
+
<concept>
|
701
|
+
<termref base='IEV' target='135-13-13'/>
|
702
|
+
</concept>
|
703
|
+
<concept>
|
704
|
+
<refterm>word</refterm>
|
705
|
+
<renderterm>word</renderterm>
|
706
|
+
<termref base='IEV' target='135-13-13'/>
|
707
|
+
</concept>
|
708
|
+
<concept>
|
709
|
+
<refterm>term</refterm>
|
710
|
+
<renderterm>word</renderterm>
|
711
|
+
<termref base='IEV' target='135-13-13'/>
|
712
|
+
</concept>
|
713
|
+
<concept>
|
714
|
+
<refterm>term</refterm>
|
715
|
+
<renderterm>word</renderterm>
|
716
|
+
<termref base='IEV' target='135-13-13'>Clause #1</termref>
|
717
|
+
</concept>
|
718
|
+
</p>
|
719
|
+
<related type='see'>
|
720
|
+
<preferred>
|
721
|
+
<expression>
|
722
|
+
<name>term</name>
|
723
|
+
</expression>
|
724
|
+
</preferred>
|
725
|
+
<termref base='IEV' target='135-13-13'/>
|
726
|
+
</related>
|
727
|
+
</sections>
|
728
|
+
</standard-document>
|
672
729
|
OUTPUT
|
673
730
|
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
674
731
|
.to be_equivalent_to xmlpp(output)
|
@@ -1084,7 +1141,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1084
1141
|
output = <<~OUTPUT
|
1085
1142
|
#{BLANK_HDR}
|
1086
1143
|
<sections>
|
1087
|
-
<form id='
|
1144
|
+
<form id='N0' name='N1' action='/action_page.php' class="checkboxes">
|
1088
1145
|
<p id='_'>
|
1089
1146
|
<label for='fname'>First name:</label>
|
1090
1147
|
<br/>
|
@@ -1267,6 +1324,8 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1267
1324
|
term:[name,name2] is a term
|
1268
1325
|
|
1269
1326
|
{{name,name2}} is a term
|
1327
|
+
|
1328
|
+
related:equivalent[name]
|
1270
1329
|
XML
|
1271
1330
|
end
|
1272
1331
|
let(:output) do
|
@@ -1277,7 +1336,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1277
1336
|
<title>Terms and definitions</title>
|
1278
1337
|
<p id='_'>For the purposes of this document, the following terms and definitions apply.</p>
|
1279
1338
|
<term id='term-name'>
|
1280
|
-
<preferred>name</preferred>
|
1339
|
+
<preferred><expression><name>name</name></expression></preferred>
|
1281
1340
|
</term>
|
1282
1341
|
</terms>
|
1283
1342
|
<clause id='_' inline-header='false' obligation='normative'>
|
@@ -1298,6 +1357,14 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1298
1357
|
</concept>
|
1299
1358
|
is a term
|
1300
1359
|
</p>
|
1360
|
+
<related type='equivalent'>
|
1361
|
+
<preferred>
|
1362
|
+
<expression>
|
1363
|
+
<name>name</name>
|
1364
|
+
</expression>
|
1365
|
+
</preferred>
|
1366
|
+
<xref target='term-name'>name</xref>
|
1367
|
+
</related>
|
1301
1368
|
</clause>
|
1302
1369
|
</sections>
|
1303
1370
|
</standard-document>
|
@@ -1332,7 +1399,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1332
1399
|
<title>Terms and definitions</title>
|
1333
1400
|
<p id='_'>For the purposes of this document, the following terms and definitions apply.</p>
|
1334
1401
|
<term id='term-name'>
|
1335
|
-
<preferred>name</preferred>
|
1402
|
+
<preferred><expression><name>name</name></expression></preferred>
|
1336
1403
|
</term>
|
1337
1404
|
</terms>
|
1338
1405
|
<clause id='_' inline-header='false' obligation='normative'>
|
@@ -1396,10 +1463,10 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1396
1463
|
<title>Terms and definitions</title>
|
1397
1464
|
<p id='_'>For the purposes of this document, the following terms and definitions apply.</p>
|
1398
1465
|
<term id='term-name-1'>
|
1399
|
-
<preferred>name</preferred>
|
1466
|
+
<preferred><expression><name>name</name></expression></preferred>
|
1400
1467
|
</term>
|
1401
1468
|
<term id='term-name2-1'>
|
1402
|
-
<preferred>name2</preferred>
|
1469
|
+
<preferred><expression><name>name2</name></expression></preferred>
|
1403
1470
|
</term>
|
1404
1471
|
</terms>
|
1405
1472
|
<clause id='term-name' inline-header='false' obligation='normative'>
|
@@ -1471,83 +1538,93 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1471
1538
|
{{name identity}} is a term
|
1472
1539
|
|
1473
1540
|
Moreover, {{missing}} is a term
|
1541
|
+
|
1542
|
+
related:equivalent[missing]
|
1474
1543
|
XML
|
1475
1544
|
end
|
1476
1545
|
let(:output) do
|
1477
1546
|
<<~XML
|
1478
|
-
|
1479
|
-
|
1480
|
-
|
1481
|
-
|
1482
|
-
|
1483
|
-
|
1484
|
-
|
1485
|
-
|
1486
|
-
|
1487
|
-
|
1488
|
-
|
1489
|
-
|
1490
|
-
|
1491
|
-
|
1492
|
-
|
1493
|
-
|
1494
|
-
|
1495
|
-
|
1496
|
-
|
1497
|
-
|
1498
|
-
|
1499
|
-
|
1500
|
-
|
1501
|
-
|
1502
|
-
|
1503
|
-
|
1504
|
-
|
1505
|
-
|
1506
|
-
|
1507
|
-
|
1508
|
-
|
1509
|
-
|
1510
|
-
term
|
1511
|
-
|
1512
|
-
|
1513
|
-
|
1514
|
-
|
1515
|
-
|
1516
|
-
|
1517
|
-
|
1518
|
-
|
1519
|
-
|
1520
|
-
|
1521
|
-
|
1522
|
-
|
1523
|
-
|
1524
|
-
|
1525
|
-
|
1526
|
-
|
1527
|
-
|
1528
|
-
|
1529
|
-
|
1530
|
-
|
1531
|
-
|
1532
|
-
|
1533
|
-
|
1534
|
-
|
1535
|
-
|
1536
|
-
|
1537
|
-
|
1538
|
-
term
|
1539
|
-
|
1540
|
-
|
1541
|
-
|
1542
|
-
|
1543
|
-
|
1544
|
-
|
1545
|
-
|
1546
|
-
|
1547
|
-
|
1548
|
-
|
1549
|
-
|
1550
|
-
|
1547
|
+
#{BLANK_HDR}
|
1548
|
+
<sections>
|
1549
|
+
<terms id='_' obligation='normative'>
|
1550
|
+
<title>Terms and definitions</title>
|
1551
|
+
<p id='_'>For the purposes of this document, the following terms and definitions apply.</p>
|
1552
|
+
<term id='term-name-identity'>
|
1553
|
+
<preferred><expression><name>name identity</name></expression></preferred>
|
1554
|
+
</term>
|
1555
|
+
<term id='name-check'>
|
1556
|
+
<preferred><expression><name>name check</name></expression></preferred>
|
1557
|
+
<related type='equivalent'>
|
1558
|
+
<strong>
|
1559
|
+
term
|
1560
|
+
<tt>missing</tt>
|
1561
|
+
not resolved via ID
|
1562
|
+
<tt>missing</tt>
|
1563
|
+
</strong>
|
1564
|
+
</related>
|
1565
|
+
<definition><verbaldefinition>
|
1566
|
+
<p id='_'>paragraph</p>
|
1567
|
+
<p id='_'>
|
1568
|
+
<concept>
|
1569
|
+
<refterm>name check</refterm>
|
1570
|
+
<renderterm>name check</renderterm>
|
1571
|
+
<xref target='name-check'/>
|
1572
|
+
</concept>
|
1573
|
+
is a term
|
1574
|
+
</p>
|
1575
|
+
<p id='_'>
|
1576
|
+
<concept>
|
1577
|
+
<refterm>name identity</refterm>
|
1578
|
+
<renderterm>name identity</renderterm>
|
1579
|
+
<xref target='term-name-identity'/>
|
1580
|
+
</concept>
|
1581
|
+
is a term
|
1582
|
+
</p>
|
1583
|
+
<p id='_'>
|
1584
|
+
Moreover,
|
1585
|
+
<concept>
|
1586
|
+
<strong>
|
1587
|
+
term
|
1588
|
+
<tt>missing</tt>
|
1589
|
+
not resolved via ID
|
1590
|
+
<tt>missing</tt>
|
1591
|
+
</strong>
|
1592
|
+
</concept>
|
1593
|
+
is a term
|
1594
|
+
</p>
|
1595
|
+
<p id='_'>
|
1596
|
+
<concept>
|
1597
|
+
<refterm>name check</refterm>
|
1598
|
+
<renderterm>name check</renderterm>
|
1599
|
+
<xref target='name-check'/>
|
1600
|
+
</concept>
|
1601
|
+
is a term
|
1602
|
+
</p>
|
1603
|
+
<p id='_'>
|
1604
|
+
<concept>
|
1605
|
+
<refterm>name identity</refterm>
|
1606
|
+
<renderterm>name identity</renderterm>
|
1607
|
+
<xref target='term-name-identity'/>
|
1608
|
+
</concept>
|
1609
|
+
is a term
|
1610
|
+
</p>
|
1611
|
+
<p id='_'>
|
1612
|
+
Moreover,
|
1613
|
+
<concept>
|
1614
|
+
<strong>
|
1615
|
+
term
|
1616
|
+
<tt>missing</tt>
|
1617
|
+
not resolved via ID
|
1618
|
+
<tt>missing</tt>
|
1619
|
+
</strong>
|
1620
|
+
</concept>
|
1621
|
+
is a term
|
1622
|
+
</p>
|
1623
|
+
</verbaldefinition></definition>
|
1624
|
+
</term>
|
1625
|
+
</terms>
|
1626
|
+
</sections>
|
1627
|
+
</standard-document>
|
1551
1628
|
XML
|
1552
1629
|
end
|
1553
1630
|
|
@@ -42,7 +42,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
42
42
|
<title>Normative references</title>
|
43
43
|
#{NORM_REF_BOILERPLATE}
|
44
44
|
<bibitem id="iso123" type="standard">
|
45
|
-
<fetched
|
45
|
+
<fetched/>
|
46
46
|
<title type='title-main' format='text/plain'>Standard</title>
|
47
47
|
<title type='main' format='text/plain'>Standard</title>
|
48
48
|
<docidentifier type="ISO">ISO 123</docidentifier>
|
@@ -304,7 +304,7 @@ formattedref::
|
|
304
304
|
<title>Normative references</title>
|
305
305
|
#{NORM_REF_BOILERPLATE}
|
306
306
|
<bibitem id="ISOTC211" type="standard">
|
307
|
-
<fetched
|
307
|
+
<fetched/>
|
308
308
|
<title type="main" format="text/plain">Geographic information</title>
|
309
309
|
<title type="subtitle" format="text/plain" language="en" script="Latn">Geographic information subtitle</title>
|
310
310
|
<title type='title-main' format='text/plain'>Other Title</title>
|
@@ -624,7 +624,7 @@ series.formattedref.script:: Latn
|
|
624
624
|
<title>Normative references</title>
|
625
625
|
#{NORM_REF_BOILERPLATE}
|
626
626
|
<bibitem id="ISOTC211" type="standard">
|
627
|
-
<fetched
|
627
|
+
<fetched/>
|
628
628
|
<title type="main" format="text/plain">Geographic information</title>
|
629
629
|
<title type="subtitle" format="text/plain" language="en" script="Latn">Geographic information subtitle</title>
|
630
630
|
<uri type="src">https://www.iso.org/standard/53798.html</uri>
|
@@ -827,7 +827,7 @@ OUTPUT
|
|
827
827
|
<docidentifier>B</docidentifier>
|
828
828
|
</bibitem>
|
829
829
|
<bibitem id='iso123' type='standard'>
|
830
|
-
<fetched
|
830
|
+
<fetched/>
|
831
831
|
<title type='title-main' format='text/plain'>Standard</title>
|
832
832
|
<title type='main' format='text/plain'>Standard</title>
|
833
833
|
<docidentifier type='ISO'>ISO 123</docidentifier>
|