metanorma-standoc 1.11.0.1 → 1.11.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -0
- data/lib/asciidoctor/standoc/base.rb +4 -100
- data/lib/asciidoctor/standoc/blocks.rb +1 -1
- data/lib/asciidoctor/standoc/cleanup.rb +2 -1
- data/lib/asciidoctor/standoc/cleanup_block.rb +1 -2
- data/lib/asciidoctor/standoc/cleanup_boilerplate.rb +28 -20
- data/lib/asciidoctor/standoc/cleanup_inline.rb +14 -4
- data/lib/asciidoctor/standoc/cleanup_ref_dl.rb +25 -15
- data/lib/asciidoctor/standoc/cleanup_reqt.rb +3 -3
- data/lib/asciidoctor/standoc/cleanup_section_names.rb +2 -2
- data/lib/asciidoctor/standoc/cleanup_terms.rb +58 -21
- data/lib/asciidoctor/standoc/cleanup_terms_designations.rb +58 -21
- data/lib/asciidoctor/standoc/cleanup_text.rb +23 -0
- data/lib/asciidoctor/standoc/datamodel/attributes_table_preprocessor.rb +6 -6
- data/lib/asciidoctor/standoc/front.rb +13 -9
- data/lib/asciidoctor/standoc/inline.rb +13 -11
- data/lib/asciidoctor/standoc/isodoc.rng +73 -19
- data/lib/asciidoctor/standoc/lists.rb +1 -3
- data/lib/asciidoctor/standoc/ref.rb +101 -75
- data/lib/asciidoctor/standoc/ref_date_id.rb +30 -1
- data/lib/asciidoctor/standoc/ref_sect.rb +16 -6
- data/lib/asciidoctor/standoc/render.rb +115 -0
- data/lib/asciidoctor/standoc/reqt.rb +1 -1
- data/lib/asciidoctor/standoc/section.rb +33 -15
- data/lib/asciidoctor/standoc/terms.rb +7 -1
- data/lib/asciidoctor/standoc/utils.rb +0 -16
- data/lib/asciidoctor/standoc/validate.rb +1 -1
- data/lib/isodoc/html/htmlstyle.css +20 -11
- data/lib/isodoc/html/htmlstyle.scss +11 -11
- data/lib/metanorma/standoc/version.rb +1 -1
- data/metanorma-standoc.gemspec +3 -3
- data/spec/asciidoctor/base_spec.rb +48 -0
- data/spec/asciidoctor/blocks_spec.rb +99 -17
- data/spec/asciidoctor/cleanup_blocks_spec.rb +24 -0
- data/spec/asciidoctor/cleanup_sections_spec.rb +1 -1
- data/spec/asciidoctor/cleanup_spec.rb +6 -6
- data/spec/asciidoctor/cleanup_terms_spec.rb +556 -89
- data/spec/asciidoctor/datamodel/attributes_table_preprocessor_spec.rb +21 -21
- data/spec/asciidoctor/datamodel/diagram_preprocessor_spec.rb +16 -16
- data/spec/asciidoctor/inline_spec.rb +174 -5
- data/spec/asciidoctor/isobib_cache_spec.rb +4 -8
- data/spec/asciidoctor/macros_spec.rb +2 -2
- data/spec/asciidoctor/refs_dl_spec.rb +4 -4
- data/spec/asciidoctor/refs_spec.rb +889 -495
- data/spec/asciidoctor/section_spec.rb +64 -2
- data/spec/spec_helper.rb +2 -2
- data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec.yml +182 -182
- data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec1.yml +12 -12
- data/spec/vcr_cassettes/isobib_get_123.yml +14 -14
- data/spec/vcr_cassettes/isobib_get_123_1.yml +99 -99
- data/spec/vcr_cassettes/isobib_get_123_1_fr.yml +107 -107
- data/spec/vcr_cassettes/isobib_get_123_2001.yml +14 -14
- data/spec/vcr_cassettes/isobib_get_124.yml +12 -12
- data/spec/vcr_cassettes/rfcbib_get_rfc8341.yml +14 -14
- data/spec/vcr_cassettes/separates_iev_citations_by_top_level_clause.yml +46 -46
- metadata +9 -8
@@ -1,20 +1,20 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
3
|
+
require "spec_helper"
|
4
4
|
|
5
5
|
RSpec.describe Asciidoctor::Standoc::Datamodel::AttributesTablePreprocessor do
|
6
|
-
describe
|
7
|
-
context
|
6
|
+
describe "#process" do
|
7
|
+
context "when simple models without relations" do
|
8
8
|
let(:datamodel_file) do
|
9
|
-
examples_path(
|
9
|
+
examples_path("datamodel/address_class_profile.adoc")
|
10
10
|
end
|
11
11
|
let(:result_file) do
|
12
|
-
examples_path(
|
12
|
+
examples_path("datamodel/address_class_profile.xml")
|
13
13
|
end
|
14
14
|
let(:output) do
|
15
15
|
[
|
16
16
|
BLANK_HDR,
|
17
|
-
File.read(fixtures_path(
|
17
|
+
File.read(fixtures_path("macros_datamodel/address_class_profile.xml")),
|
18
18
|
]
|
19
19
|
.join
|
20
20
|
end
|
@@ -27,7 +27,7 @@ RSpec.describe Asciidoctor::Standoc::Datamodel::AttributesTablePreprocessor do
|
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
30
|
-
it
|
30
|
+
it "correctly renders input" do
|
31
31
|
Asciidoctor.convert_file(datamodel_file,
|
32
32
|
backend: :standoc,
|
33
33
|
safe: :safe,
|
@@ -37,18 +37,18 @@ RSpec.describe Asciidoctor::Standoc::Datamodel::AttributesTablePreprocessor do
|
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
40
|
-
context
|
40
|
+
context "when complex relations" do
|
41
41
|
let(:datamodel_file) do
|
42
|
-
examples_path(
|
42
|
+
examples_path("datamodel/address_component_profile.adoc")
|
43
43
|
end
|
44
44
|
let(:result_file) do
|
45
|
-
examples_path(
|
45
|
+
examples_path("datamodel/address_component_profile.xml")
|
46
46
|
end
|
47
47
|
let(:output) do
|
48
|
-
path = fixtures_path(
|
48
|
+
path = fixtures_path("macros_datamodel/address_component_profile.xml")
|
49
49
|
[
|
50
50
|
BLANK_HDR,
|
51
|
-
File.read(path)
|
51
|
+
File.read(path),
|
52
52
|
]
|
53
53
|
.join("\n")
|
54
54
|
end
|
@@ -56,14 +56,14 @@ RSpec.describe Asciidoctor::Standoc::Datamodel::AttributesTablePreprocessor do
|
|
56
56
|
after do
|
57
57
|
%w[doc html xml err].each do |extention|
|
58
58
|
path = examples_path(
|
59
|
-
"datamodel/address_component_profile.#{extention}"
|
59
|
+
"datamodel/address_component_profile.#{extention}",
|
60
60
|
)
|
61
61
|
FileUtils.rm_f(path)
|
62
62
|
FileUtils.rm_f("address_component_profile.#{extention}")
|
63
63
|
end
|
64
64
|
end
|
65
65
|
|
66
|
-
it
|
66
|
+
it "correctly renders input" do
|
67
67
|
Asciidoctor.convert_file(datamodel_file,
|
68
68
|
backend: :standoc,
|
69
69
|
safe: :safe,
|
@@ -73,32 +73,32 @@ RSpec.describe Asciidoctor::Standoc::Datamodel::AttributesTablePreprocessor do
|
|
73
73
|
end
|
74
74
|
end
|
75
75
|
|
76
|
-
context
|
76
|
+
context "when missing definition" do
|
77
77
|
let(:datamodel_file) do
|
78
|
-
examples_path(
|
78
|
+
examples_path("datamodel/blank_definition_profile.adoc")
|
79
79
|
end
|
80
80
|
let(:result_file) do
|
81
|
-
examples_path(
|
81
|
+
examples_path("datamodel/blank_definition_profile.xml")
|
82
82
|
end
|
83
83
|
let(:output) do
|
84
|
-
path = fixtures_path(
|
84
|
+
path = fixtures_path("macros_datamodel/blank_definition_profile.xml")
|
85
85
|
[
|
86
86
|
BLANK_HDR,
|
87
|
-
File.read(path)
|
87
|
+
File.read(path),
|
88
88
|
].join("\n")
|
89
89
|
end
|
90
90
|
|
91
91
|
after do
|
92
92
|
%w[doc html xml err].each do |extention|
|
93
93
|
path = examples_path(
|
94
|
-
"datamodel/blank_definition_profile.#{extention}"
|
94
|
+
"datamodel/blank_definition_profile.#{extention}",
|
95
95
|
)
|
96
96
|
FileUtils.rm_f(path)
|
97
97
|
FileUtils.rm_f("blank_definition_profile.#{extention}")
|
98
98
|
end
|
99
99
|
end
|
100
100
|
|
101
|
-
it
|
101
|
+
it "correctly renders input" do
|
102
102
|
Asciidoctor.convert_file(datamodel_file,
|
103
103
|
backend: :standoc,
|
104
104
|
safe: :safe,
|
@@ -1,22 +1,22 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
3
|
+
require "spec_helper"
|
4
4
|
|
5
5
|
RSpec.describe Asciidoctor::Standoc::Datamodel::DiagramPreprocessor do
|
6
|
-
describe
|
7
|
-
context
|
6
|
+
describe "#process" do
|
7
|
+
context "when simple models without relations" do
|
8
8
|
let(:datamodel_file) do
|
9
|
-
examples_path(
|
9
|
+
examples_path("datamodel/common_models_diagram.adoc")
|
10
10
|
end
|
11
11
|
let(:result_file) do
|
12
|
-
examples_path(
|
12
|
+
examples_path("datamodel/common_models_diagram.xml")
|
13
13
|
end
|
14
14
|
let(:output) do
|
15
15
|
[
|
16
16
|
BLANK_HDR,
|
17
17
|
File.read(
|
18
|
-
fixtures_path(
|
19
|
-
)
|
18
|
+
fixtures_path("macros_datamodel/common_models_diagram.xml"),
|
19
|
+
),
|
20
20
|
].join
|
21
21
|
end
|
22
22
|
|
@@ -26,10 +26,10 @@ RSpec.describe Asciidoctor::Standoc::Datamodel::DiagramPreprocessor do
|
|
26
26
|
FileUtils.rm_f(path)
|
27
27
|
FileUtils.rm_f("common_models_diagram.#{extention}")
|
28
28
|
end
|
29
|
-
FileUtils.rm_rf(
|
29
|
+
FileUtils.rm_rf("common_models_diagram_htmlimages")
|
30
30
|
end
|
31
31
|
|
32
|
-
it
|
32
|
+
it "correctly renders input" do
|
33
33
|
Asciidoctor.convert_file(datamodel_file,
|
34
34
|
backend: :standoc,
|
35
35
|
safe: :safe,
|
@@ -39,13 +39,13 @@ RSpec.describe Asciidoctor::Standoc::Datamodel::DiagramPreprocessor do
|
|
39
39
|
end
|
40
40
|
end
|
41
41
|
|
42
|
-
context
|
43
|
-
let(:datamodel_file) { examples_path(
|
44
|
-
let(:result_file) { examples_path(
|
42
|
+
context "when complex relations" do
|
43
|
+
let(:datamodel_file) { examples_path("datamodel/top_down_diagram.adoc") }
|
44
|
+
let(:result_file) { examples_path("datamodel/top_down_diagram.xml") }
|
45
45
|
let(:output) do
|
46
46
|
[
|
47
47
|
BLANK_HDR,
|
48
|
-
File.read(fixtures_path(
|
48
|
+
File.read(fixtures_path("macros_datamodel/top_down_diagram.xml")),
|
49
49
|
].join("\n")
|
50
50
|
end
|
51
51
|
|
@@ -55,11 +55,11 @@ RSpec.describe Asciidoctor::Standoc::Datamodel::DiagramPreprocessor do
|
|
55
55
|
FileUtils.rm_f(path)
|
56
56
|
FileUtils.rm_f("top_down_diagram.#{extention}")
|
57
57
|
end
|
58
|
-
FileUtils.rm_rf(examples_path(
|
59
|
-
FileUtils.rm_rf(
|
58
|
+
FileUtils.rm_rf(examples_path("datamodel/plantuml"))
|
59
|
+
FileUtils.rm_rf("top_down_diagram_htmlimages")
|
60
60
|
end
|
61
61
|
|
62
|
-
it
|
62
|
+
it "correctly renders input" do
|
63
63
|
Asciidoctor.convert_file(datamodel_file,
|
64
64
|
backend: :standoc,
|
65
65
|
safe: :safe,
|
@@ -294,9 +294,9 @@ RSpec.describe Asciidoctor::Standoc do
|
|
294
294
|
http://example.com[Link]
|
295
295
|
http://example.com[Link,title="tip"]
|
296
296
|
link:++https://asciidoctor.org/now_this__link_works.html++[]
|
297
|
-
http://example.com[Link,
|
297
|
+
http://example.com[Link,update-type=true]
|
298
298
|
link:../example[updatetype=true]
|
299
|
-
link:../example[Link,
|
299
|
+
link:../example[Link,update-type=true]
|
300
300
|
INPUT
|
301
301
|
output = <<~OUTPUT
|
302
302
|
#{BLANK_HDR}
|
@@ -306,9 +306,9 @@ RSpec.describe Asciidoctor::Standoc do
|
|
306
306
|
<link target="http://example.com">Link</link>
|
307
307
|
<link target="http://example.com" alt="tip">Link</link>
|
308
308
|
<link target='https://asciidoctor.org/now_this__link_works.html'/>
|
309
|
-
<link target="http://example.com"
|
310
|
-
<link target="../example"
|
311
|
-
<link target="../example"
|
309
|
+
<link target="http://example.com" update-type="true">Link</link>
|
310
|
+
<link target="../example" update-type="true"/>
|
311
|
+
<link target="../example" update-type="true">Link</link></p>
|
312
312
|
</p>
|
313
313
|
</sections>
|
314
314
|
</standard-document>
|
@@ -389,6 +389,61 @@ RSpec.describe Asciidoctor::Standoc do
|
|
389
389
|
.to be_equivalent_to(output)
|
390
390
|
end
|
391
391
|
|
392
|
+
it "processes formatting within crossreferences" do
|
393
|
+
input = <<~INPUT
|
394
|
+
#{ASCIIDOC_BLANK_HDR}
|
395
|
+
[[reference]]
|
396
|
+
== Section
|
397
|
+
|
398
|
+
<<reference,_reference_>>
|
399
|
+
<<reference,_**reference**_>>
|
400
|
+
<<reference,_A_ stem:[x^2]>>
|
401
|
+
<<reference,_A_ footnote:[_B_]>>
|
402
|
+
INPUT
|
403
|
+
output = <<~OUTPUT
|
404
|
+
#{BLANK_HDR}
|
405
|
+
<sections>
|
406
|
+
<clause id="reference" inline-header="false" obligation="normative">
|
407
|
+
<title>Section</title>
|
408
|
+
<p id="_"><xref target="reference"><em>reference</em></xref>
|
409
|
+
<xref target="reference"><em><strong>reference</strong></em></xref>
|
410
|
+
<xref target="reference"><em>A</em> <stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msup><mrow><mi>x</mi></mrow><mrow><mn>2</mn></mrow></msup></math></stem></xref>
|
411
|
+
<xref target="reference"><em>A</em><fn reference="1"><p id="_"><em>B</em></p></fn></xref></p>
|
412
|
+
</clause>
|
413
|
+
</sections>
|
414
|
+
</standard-document>
|
415
|
+
OUTPUT
|
416
|
+
expect((strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
417
|
+
.to be_equivalent_to(output)
|
418
|
+
end
|
419
|
+
|
420
|
+
it "processes formatting within crossreferences to non-existent anchor" do
|
421
|
+
input = <<~INPUT
|
422
|
+
#{ASCIIDOC_BLANK_HDR}
|
423
|
+
== Section
|
424
|
+
|
425
|
+
<<reference,_reference_>>
|
426
|
+
<<reference,_**reference**_>>
|
427
|
+
<<reference,_A_ stem:[x^2]>>
|
428
|
+
<<reference,_A_ footnote:[_B_]>>
|
429
|
+
INPUT
|
430
|
+
output = <<~OUTPUT
|
431
|
+
#{BLANK_HDR}
|
432
|
+
<sections>
|
433
|
+
<clause id="_" inline-header="false" obligation="normative">
|
434
|
+
<title>Section</title>
|
435
|
+
<p id="_"><xref target="reference"><em>reference</em></xref>
|
436
|
+
<xref target="reference"><em><strong>reference</strong></em></xref>
|
437
|
+
<xref target="reference"><em>A</em> <stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msup><mrow><mi>x</mi></mrow><mrow><mn>2</mn></mrow></msup></math></stem></xref>
|
438
|
+
<xref target="reference"><em>A</em><fn reference="1"><p id="_"><em>B</em></p></fn></xref></p>
|
439
|
+
</clause>
|
440
|
+
</sections>
|
441
|
+
</standard-document>
|
442
|
+
OUTPUT
|
443
|
+
expect((strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
444
|
+
.to be_equivalent_to(output)
|
445
|
+
end
|
446
|
+
|
392
447
|
it "processes bibliographic anchors" do
|
393
448
|
input = <<~INPUT
|
394
449
|
#{ASCIIDOC_BLANK_HDR}
|
@@ -423,6 +478,120 @@ RSpec.describe Asciidoctor::Standoc do
|
|
423
478
|
.to be_equivalent_to(output)
|
424
479
|
end
|
425
480
|
|
481
|
+
it "processes formatting within bibliographic references" do
|
482
|
+
input = <<~INPUT
|
483
|
+
#{ASCIIDOC_BLANK_HDR}
|
484
|
+
== Section
|
485
|
+
|
486
|
+
<<reference,_reference_>>
|
487
|
+
<<reference,_**reference**_>>
|
488
|
+
<<reference,_A_ stem:[x^2]>>
|
489
|
+
<<reference,_A_ footnote:[_B_]>>
|
490
|
+
<<reference,clause=3.4.2, ISO 9000:2005 footnote:[Superseded by ISO 9000:2015.]>>
|
491
|
+
|
492
|
+
[bibliography]
|
493
|
+
== Normative References
|
494
|
+
|
495
|
+
* [[[reference,ABC]]] Reference
|
496
|
+
INPUT
|
497
|
+
output = <<~OUTPUT
|
498
|
+
#{BLANK_HDR}
|
499
|
+
<sections><clause id="_" inline-header="false" obligation="normative">
|
500
|
+
<title>Section</title>
|
501
|
+
<p id="_"><eref type="inline" bibitemid="reference" citeas="ABC"><em>reference</em></eref>
|
502
|
+
<eref type="inline" bibitemid="reference" citeas="ABC"><em><strong>reference</strong></em></eref>
|
503
|
+
<eref type="inline" bibitemid="reference" citeas="ABC"><em>A</em> <stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msup><mrow><mi>x</mi></mrow><mrow><mn>2</mn></mrow></msup></math></stem></eref>
|
504
|
+
<eref type="inline" bibitemid="reference" citeas="ABC"><em>A</em><fn reference="1"><p id="_"><em>B</em></p></fn></eref>
|
505
|
+
<eref type="inline" bibitemid="reference" citeas="ABC"><localityStack><locality type="clause"><referenceFrom>3.4.2</referenceFrom></locality></localityStack>ISO 9000:2005<fn reference="2"><p id="_">Superseded by ISO 9000:2015.</p></fn></eref></p>
|
506
|
+
</clause>
|
507
|
+
</sections><bibliography><references id="_" normative="true" obligation="informative">
|
508
|
+
<title>Normative references</title><p id="_">The following documents are referred to in the text in such a way that some or all of their content constitutes requirements of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies.</p>
|
509
|
+
<bibitem id="reference">
|
510
|
+
<formattedref format="application/x-isodoc+xml">Reference</formattedref>
|
511
|
+
<docidentifier>ABC</docidentifier>
|
512
|
+
</bibitem>
|
513
|
+
</references></bibliography>
|
514
|
+
</standard-document>
|
515
|
+
OUTPUT
|
516
|
+
expect((strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
517
|
+
.to be_equivalent_to(output)
|
518
|
+
end
|
519
|
+
|
520
|
+
it "processes formatting within term sources" do
|
521
|
+
input = <<~INPUT
|
522
|
+
#{ASCIIDOC_BLANK_HDR}
|
523
|
+
== Terms and Definitions
|
524
|
+
|
525
|
+
=== Term1
|
526
|
+
|
527
|
+
[.source]
|
528
|
+
<<reference,_reference_>>
|
529
|
+
|
530
|
+
[.source]
|
531
|
+
<<reference,_**reference**_>>
|
532
|
+
|
533
|
+
[.source]
|
534
|
+
<<reference,_A_ stem:[x^2]>>
|
535
|
+
|
536
|
+
[.source]
|
537
|
+
<<reference,_A_ footnote:[_B_]>>
|
538
|
+
|
539
|
+
[.source]
|
540
|
+
<<reference,clause=3.4.2, ISO 9000:2005 footnote:[Superseded by ISO 9000:2015.]>>
|
541
|
+
|
542
|
+
[bibliography]
|
543
|
+
== Normative References
|
544
|
+
|
545
|
+
* [[[reference,ABC]]] Reference
|
546
|
+
INPUT
|
547
|
+
output = <<~OUTPUT
|
548
|
+
#{BLANK_HDR}
|
549
|
+
<sections><terms id="_" obligation="normative">
|
550
|
+
<title>Terms and definitions</title><p id="_">For the purposes of this document,
|
551
|
+
the following terms and definitions apply.</p>
|
552
|
+
|
553
|
+
<term id="term-term1"><preferred><expression><name>Term1</name></expression><termsource status="identical" type="authoritative">
|
554
|
+
<origin bibitemid="reference" type="inline" citeas="ABC">
|
555
|
+
<em>reference</em>
|
556
|
+
</origin>
|
557
|
+
</termsource><termsource status="identical" type="authoritative">
|
558
|
+
<origin bibitemid="reference" type="inline" citeas="ABC">
|
559
|
+
<em>
|
560
|
+
<strong>reference</strong>
|
561
|
+
</em>
|
562
|
+
</origin>
|
563
|
+
</termsource><termsource status="identical" type="authoritative">
|
564
|
+
<origin bibitemid="reference" type="inline" citeas="ABC"><em>A</em> <stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msup><mrow><mi>x</mi></mrow><mrow><mn>2</mn></mrow></msup></math></stem></origin>
|
565
|
+
</termsource><termsource status="identical" type="authoritative">
|
566
|
+
<origin bibitemid="reference" type="inline" citeas="ABC"><em>A</em><fn reference="1">
|
567
|
+
<p id="_">
|
568
|
+
<em>B</em>
|
569
|
+
</p>
|
570
|
+
</fn></origin>
|
571
|
+
</termsource><termsource status="identical" type="authoritative">
|
572
|
+
<origin bibitemid="reference" type="inline" citeas="ABC"><localityStack><locality type="clause"><referenceFrom>3.4.2</referenceFrom></locality></localityStack>ISO 9000:2005<fn reference="2">
|
573
|
+
<p id="_">Superseded by ISO 9000:2015.</p>
|
574
|
+
</fn></origin>
|
575
|
+
</termsource></preferred>
|
576
|
+
|
577
|
+
|
578
|
+
|
579
|
+
</term>
|
580
|
+
</terms>
|
581
|
+
</sections><bibliography><references id="_" normative="true" obligation="informative">
|
582
|
+
<title>Normative references</title><p id="_">The following documents are referred to in the text in such a way that some or all of their content constitutes requirements of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies.</p>
|
583
|
+
<bibitem id="reference">
|
584
|
+
<formattedref format="application/x-isodoc+xml">Reference</formattedref>
|
585
|
+
<docidentifier>ABC</docidentifier>
|
586
|
+
|
587
|
+
</bibitem>
|
588
|
+
</references></bibliography>
|
589
|
+
</standard-document>
|
590
|
+
OUTPUT
|
591
|
+
expect((strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
592
|
+
.to be_equivalent_to(output)
|
593
|
+
end
|
594
|
+
|
426
595
|
it "processes footnotes" do
|
427
596
|
input = <<~INPUT
|
428
597
|
#{ASCIIDOC_BLANK_HDR}
|
@@ -716,29 +716,25 @@ RSpec.describe Asciidoctor::Standoc do
|
|
716
716
|
|
717
717
|
def mock_isobib_get_123
|
718
718
|
expect(RelatonIso::IsoBibliography).to receive(:get)
|
719
|
-
.with("ISO 123", "2001",
|
720
|
-
{ lang: "en", title: "<em>Standard</em>", usrlbl: nil })
|
719
|
+
.with("ISO 123", "2001", anything)
|
721
720
|
.and_return(RelatonIsoBib::XMLParser.from_xml(ISO_123_DATED))
|
722
721
|
end
|
723
722
|
|
724
723
|
def mock_isobib_get_123_undated
|
725
724
|
expect(RelatonIso::IsoBibliography).to receive(:get)
|
726
|
-
.with("ISO 123", nil,
|
727
|
-
{ lang: "en", title: "<em>Standard</em>", usrlbl: nil })
|
725
|
+
.with("ISO 123", nil, anything)
|
728
726
|
.and_return(RelatonIsoBib::XMLParser.from_xml(ISO_123_UNDATED))
|
729
727
|
end
|
730
728
|
|
731
729
|
def mock_isobib_get_124
|
732
730
|
expect(RelatonIso::IsoBibliography).to receive(:get)
|
733
|
-
.with("ISO 124", "2014",
|
734
|
-
{ lang: "en", title: "<em>Standard</em>", usrlbl: nil })
|
731
|
+
.with("ISO 124", "2014", anything)
|
735
732
|
.and_return(RelatonIsoBib::XMLParser.from_xml(ISO_124_DATED))
|
736
733
|
end
|
737
734
|
|
738
735
|
def mock_ietfbib_get_123
|
739
736
|
expect(RelatonIetf::IetfBibliography).to receive(:get)
|
740
|
-
.with("RFC 123", nil,
|
741
|
-
{ lang: "en", title: "<em>Standard</em>", usrlbl: nil })
|
737
|
+
.with("RFC 123", nil, anything)
|
742
738
|
.and_return(RelatonIsoBib::XMLParser.from_xml(IETF_123_SHORT))
|
743
739
|
end
|
744
740
|
end
|
@@ -1562,7 +1562,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1562
1562
|
<tt>missing</tt>
|
1563
1563
|
</strong>
|
1564
1564
|
</related>
|
1565
|
-
<definition><
|
1565
|
+
<definition><verbal-definition>
|
1566
1566
|
<p id='_'>paragraph</p>
|
1567
1567
|
<p id='_'>
|
1568
1568
|
<concept>
|
@@ -1620,7 +1620,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1620
1620
|
</concept>
|
1621
1621
|
is a term
|
1622
1622
|
</p>
|
1623
|
-
</
|
1623
|
+
</verbal-definition></definition>
|
1624
1624
|
</term>
|
1625
1625
|
</terms>
|
1626
1626
|
</sections>
|
@@ -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>
|