metanorma-standoc 1.11.0.1 → 1.11.4
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/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
@@ -76,6 +76,12 @@ code *, pre *, tt *, kbd *, samp * {
|
|
76
76
|
font-family: {{monospacefont}} !important;
|
77
77
|
font-variant-ligatures: none; }
|
78
78
|
|
79
|
+
p code, dt code, li code, label code, legend code, caption code, th code, td code,
|
80
|
+
p tt, dt tt, li tt, label tt, legend tt, caption tt, th tt, td tt,
|
81
|
+
p kbd, dt kbd, li kbd, label kbd, legend kbd, caption kbd, th kbd, td kbd,
|
82
|
+
p samp, dt samp, li samp, label samp, legend samp, caption samp, th samp, td samp {
|
83
|
+
font-size: {{monospacefontsize}}; }
|
84
|
+
|
79
85
|
article, aside, details, figcaption, figure,
|
80
86
|
footer, header, hgroup, menu, nav, section {
|
81
87
|
display: block; }
|
@@ -87,6 +93,9 @@ table {
|
|
87
93
|
h1, h2, h3, h4, h5, h6 {
|
88
94
|
font-family: {{headerfont}}; }
|
89
95
|
|
96
|
+
.h1, .h2, .h3, .h4, .h5, .h6 {
|
97
|
+
font-family: {{headerfont}}; }
|
98
|
+
|
90
99
|
blockquote, q {
|
91
100
|
quotes: none; }
|
92
101
|
blockquote:before, blockquote:after, q:before, q:after {
|
@@ -467,32 +476,32 @@ p.document-stage {
|
|
467
476
|
/*
|
468
477
|
3.1 Titles
|
469
478
|
*/
|
470
|
-
h1, h2, h3, h4, h5, h6 {
|
479
|
+
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
|
471
480
|
font-family: {{headerfont}};
|
472
481
|
color: #C70039;
|
473
482
|
font-weight: 300;
|
474
483
|
margin-top: 1.6em;
|
475
484
|
margin-bottom: 0.3em; }
|
476
485
|
|
477
|
-
h1 {
|
486
|
+
h1, .h1 {
|
478
487
|
font-size: 1.6em;
|
479
488
|
text-transform: uppercase;
|
480
489
|
margin-top: 2em; }
|
481
490
|
|
482
|
-
h1#content {
|
491
|
+
h1#content, #content.h1 {
|
483
492
|
margin-top: 2em; }
|
484
493
|
|
485
|
-
h2 {
|
494
|
+
h2, .h2 {
|
486
495
|
margin-top: 1.3em;
|
487
496
|
font-size: 1.3em;
|
488
497
|
font-weight: 400; }
|
489
498
|
|
490
|
-
h3 {
|
499
|
+
h3, .h3 {
|
491
500
|
margin-top: 1.1em;
|
492
501
|
font-size: 1.1em;
|
493
502
|
font-weight: 100; }
|
494
503
|
|
495
|
-
.TermNum
|
504
|
+
.TermNum {
|
496
505
|
color: #C70039;
|
497
506
|
font-weight: 100; }
|
498
507
|
|
@@ -791,7 +800,7 @@ p {
|
|
791
800
|
margin-top: 1em;
|
792
801
|
margin-bottom: 1em; }
|
793
802
|
|
794
|
-
h2 p {
|
803
|
+
h2 p, .h2 p {
|
795
804
|
display: inline; }
|
796
805
|
|
797
806
|
/*
|
@@ -942,7 +951,7 @@ To top button
|
|
942
951
|
@media print {
|
943
952
|
.document-info, nav, .copyright {
|
944
953
|
page-break-before: always; }
|
945
|
-
h1, h2, h3, h4 {
|
954
|
+
h1, h2, h3, h4, .h1, .h2, .h3, .h4 {
|
946
955
|
page-break-after: avoid;
|
947
956
|
margin-top: 1.2em; }
|
948
957
|
.note, .figure, pre, .pseudocode, table {
|
@@ -965,12 +974,12 @@ To top button
|
|
965
974
|
h1.content {
|
966
975
|
margin-top: 2em;
|
967
976
|
line-height: 2.5em; }
|
968
|
-
h1 {
|
977
|
+
h1, .h1 {
|
969
978
|
font-size: 1.5em;
|
970
979
|
line-height: 1.5; }
|
971
|
-
h2 {
|
980
|
+
h2, .h2 {
|
972
981
|
font-size: 1.2em; }
|
973
|
-
h3 {
|
982
|
+
h3, .h3 {
|
974
983
|
font-size: 1em; }
|
975
984
|
.Note {
|
976
985
|
background-color: #fff495;
|
@@ -155,7 +155,7 @@ p.document-stage {
|
|
155
155
|
3.1 Titles
|
156
156
|
*/
|
157
157
|
|
158
|
-
h1,h2,h3,h4,h5,h6 {
|
158
|
+
h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6 {
|
159
159
|
font-family: $headerfont;
|
160
160
|
color: #C70039;
|
161
161
|
font-weight: 300;
|
@@ -163,29 +163,29 @@ p.document-stage {
|
|
163
163
|
margin-bottom: 0.3em;
|
164
164
|
}
|
165
165
|
|
166
|
-
h1 {
|
166
|
+
h1,.h1 {
|
167
167
|
font-size: 1.6em;
|
168
168
|
text-transform: uppercase;
|
169
169
|
margin-top: 2em;
|
170
170
|
}
|
171
171
|
|
172
|
-
h1#content {
|
172
|
+
h1#content,.h1#content {
|
173
173
|
margin-top: 2em;
|
174
174
|
}
|
175
175
|
|
176
|
-
h2 {
|
176
|
+
h2,.h2 {
|
177
177
|
margin-top: 1.3em;
|
178
178
|
font-size: 1.3em;
|
179
179
|
font-weight: 400;
|
180
180
|
}
|
181
181
|
|
182
|
-
h3 {
|
182
|
+
h3,.h3 {
|
183
183
|
margin-top: 1.1em;
|
184
184
|
font-size: 1.1em;
|
185
185
|
font-weight: 100;
|
186
186
|
}
|
187
187
|
|
188
|
-
.TermNum
|
188
|
+
.TermNum {
|
189
189
|
color: #C70039;
|
190
190
|
font-weight: 100;
|
191
191
|
}
|
@@ -471,7 +471,7 @@ p {
|
|
471
471
|
margin-bottom: 1em;
|
472
472
|
}
|
473
473
|
|
474
|
-
h2 p {
|
474
|
+
h2 p, .h2 p {
|
475
475
|
display: inline;
|
476
476
|
}
|
477
477
|
|
@@ -643,7 +643,7 @@ To top button
|
|
643
643
|
page-break-before: always;
|
644
644
|
}
|
645
645
|
|
646
|
-
h1, h2, h3, h4 {
|
646
|
+
h1, h2, h3, h4, .h1, .h2, .h3, .h4 {
|
647
647
|
page-break-after: avoid;
|
648
648
|
margin-top: 1.2em;
|
649
649
|
}
|
@@ -685,16 +685,16 @@ To top button
|
|
685
685
|
line-height: 2.5em;
|
686
686
|
}
|
687
687
|
|
688
|
-
h1 {
|
688
|
+
h1, .h1 {
|
689
689
|
font-size: 1.5em;
|
690
690
|
line-height: 1.5;
|
691
691
|
}
|
692
692
|
|
693
|
-
h2 {
|
693
|
+
h2, .h2 {
|
694
694
|
font-size: 1.2em
|
695
695
|
}
|
696
696
|
|
697
|
-
h3 {
|
697
|
+
h3, .h3 {
|
698
698
|
font-size: 1em;
|
699
699
|
}
|
700
700
|
|
data/metanorma-standoc.gemspec
CHANGED
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
|
|
27
27
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
|
28
28
|
|
29
29
|
spec.add_dependency "asciidoctor", "~> 2.0.0"
|
30
|
-
spec.add_dependency "iev", "~> 0.
|
30
|
+
spec.add_dependency "iev", "~> 0.3.0"
|
31
31
|
spec.add_dependency "isodoc", "~> 1.8.0"
|
32
32
|
spec.add_dependency "metanorma-plugin-datastruct"
|
33
33
|
spec.add_dependency "metanorma-plugin-lutaml"
|
@@ -37,12 +37,12 @@ Gem::Specification.new do |spec|
|
|
37
37
|
spec.add_dependency "concurrent-ruby"
|
38
38
|
spec.add_dependency "latexmath"
|
39
39
|
spec.add_dependency "mathml2asciimath"
|
40
|
-
spec.add_dependency "metanorma-utils", "~> 1.2.
|
40
|
+
spec.add_dependency "metanorma-utils", "~> 1.2.8"
|
41
41
|
spec.add_dependency "relaton-cli", "~> 1.9.0"
|
42
42
|
spec.add_dependency "relaton-iev", "~> 1.1.0"
|
43
43
|
spec.add_dependency "unicode2latex", "~> 0.0.1"
|
44
44
|
|
45
|
-
spec.add_development_dependency "
|
45
|
+
spec.add_development_dependency "debug"
|
46
46
|
spec.add_development_dependency "equivalent-xml", "~> 0.6"
|
47
47
|
spec.add_development_dependency "guard", "~> 2.14"
|
48
48
|
spec.add_development_dependency "guard-rspec", "~> 4.7"
|
@@ -849,6 +849,47 @@ RSpec.describe Asciidoctor::Standoc do
|
|
849
849
|
.to be_equivalent_to xmlpp(output)
|
850
850
|
end
|
851
851
|
|
852
|
+
it "processes document relations by description" do
|
853
|
+
mock_relaton_relation_descriptions
|
854
|
+
input = <<~INPUT
|
855
|
+
= Document title
|
856
|
+
Author
|
857
|
+
:docfile: test.adoc
|
858
|
+
:nodoc:
|
859
|
+
:novalid:
|
860
|
+
:normatively-cited-in: ABC
|
861
|
+
|
862
|
+
INPUT
|
863
|
+
output = <<~OUTPUT
|
864
|
+
<standard-document xmlns="https://www.metanorma.org/ns/standoc" type="semantic" version="#{Metanorma::Standoc::VERSION}">
|
865
|
+
<bibdata type='standard'>
|
866
|
+
<title language='en' format='text/plain'>Document title</title>
|
867
|
+
<language>en</language>
|
868
|
+
<script>Latn</script>
|
869
|
+
<status>
|
870
|
+
<stage>published</stage>
|
871
|
+
</status>
|
872
|
+
<copyright>
|
873
|
+
<from>2021</from>
|
874
|
+
</copyright>
|
875
|
+
<relation type='isCitedIn'>
|
876
|
+
<description>normatively cited in</description>
|
877
|
+
<bibitem>
|
878
|
+
<title>--</title>
|
879
|
+
<docidentifier>ABC</docidentifier>
|
880
|
+
</bibitem>
|
881
|
+
</relation>
|
882
|
+
<ext>
|
883
|
+
<doctype>article</doctype>
|
884
|
+
</ext>
|
885
|
+
</bibdata>
|
886
|
+
<sections> </sections>
|
887
|
+
</standard-document>
|
888
|
+
OUTPUT
|
889
|
+
expect(xmlpp(Asciidoctor.convert(input, *OPTIONS)))
|
890
|
+
.to be_equivalent_to xmlpp(output)
|
891
|
+
end
|
892
|
+
|
852
893
|
it "reads scripts into blank HTML document" do
|
853
894
|
FileUtils.rm_f "test.html"
|
854
895
|
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
@@ -986,4 +1027,11 @@ QU1FOiB0ZXN0Cgo=
|
|
986
1027
|
"International Standards Organization",
|
987
1028
|
)
|
988
1029
|
end
|
1030
|
+
|
1031
|
+
def mock_relaton_relation_descriptions
|
1032
|
+
allow_any_instance_of(::Asciidoctor::Standoc::Front)
|
1033
|
+
.to receive(:relaton_relation_descriptions).and_return(
|
1034
|
+
"normatively-cited-in" => "isCitedIn",
|
1035
|
+
)
|
1036
|
+
end
|
989
1037
|
end
|
@@ -355,7 +355,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
355
355
|
<term id='term-term1'>
|
356
356
|
<preferred><expression><name>Term1</name></expression></preferred>
|
357
357
|
<definition>
|
358
|
-
<
|
358
|
+
<verbal-definition>
|
359
359
|
<p id='_'>first definition</p>
|
360
360
|
<termsource status='identical' type="authoritative">
|
361
361
|
<origin bibitemid='ISO2191' type='inline' citeas=''>
|
@@ -366,10 +366,10 @@ RSpec.describe Asciidoctor::Standoc do
|
|
366
366
|
</localityStack>
|
367
367
|
</origin>
|
368
368
|
</termsource>
|
369
|
-
</
|
369
|
+
</verbal-definition>
|
370
370
|
</definition>
|
371
371
|
<definition>
|
372
|
-
<
|
372
|
+
<verbal-definition>
|
373
373
|
<p id='_'>second definition</p>
|
374
374
|
<termsource status='identical' type="authoritative">
|
375
375
|
<origin bibitemid='ISO2191' type='inline' citeas=''>
|
@@ -380,7 +380,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
380
380
|
</localityStack>
|
381
381
|
</origin>
|
382
382
|
</termsource>
|
383
|
-
</
|
383
|
+
</verbal-definition>
|
384
384
|
</definition>
|
385
385
|
<termnote id='_'>
|
386
386
|
<p id='_'>This is a note</p>
|
@@ -514,6 +514,59 @@ RSpec.describe Asciidoctor::Standoc do
|
|
514
514
|
.to be_equivalent_to xmlpp(output)
|
515
515
|
end
|
516
516
|
|
517
|
+
it "processes nested terms" do
|
518
|
+
input = <<~INPUT
|
519
|
+
#{ASCIIDOC_BLANK_HDR}
|
520
|
+
== Terms and Definitions
|
521
|
+
|
522
|
+
[.term]
|
523
|
+
=== Term1
|
524
|
+
|
525
|
+
definition
|
526
|
+
|
527
|
+
NOTE: Note 1
|
528
|
+
|
529
|
+
==== Term11
|
530
|
+
definition2
|
531
|
+
|
532
|
+
NOTE: Note 2
|
533
|
+
INPUT
|
534
|
+
output = <<~OUTPUT
|
535
|
+
#{BLANK_HDR}
|
536
|
+
<sections>
|
537
|
+
<clause id='_' obligation='normative'>
|
538
|
+
<title>Terms and definitions</title>
|
539
|
+
<p id='_'>For the purposes of this document, the following terms and definitions apply.</p>
|
540
|
+
<terms id='_' obligation='normative'>
|
541
|
+
<title>Term1</title>
|
542
|
+
<p id='_'>definition</p>
|
543
|
+
<note id='_'>
|
544
|
+
<p id='_'>Note 1</p>
|
545
|
+
</note>
|
546
|
+
<term id='term-term11'>
|
547
|
+
<preferred>
|
548
|
+
<expression>
|
549
|
+
<name>Term11</name>
|
550
|
+
</expression>
|
551
|
+
</preferred>
|
552
|
+
<definition>
|
553
|
+
<verbal-definition>
|
554
|
+
<p id='_'>definition2</p>
|
555
|
+
</verbal-definition>
|
556
|
+
</definition>
|
557
|
+
<termnote id='_'>
|
558
|
+
<p id='_'>Note 2</p>
|
559
|
+
</termnote>
|
560
|
+
</term>
|
561
|
+
</terms>
|
562
|
+
</clause>
|
563
|
+
</sections>
|
564
|
+
</standard-document>
|
565
|
+
OUTPUT
|
566
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
567
|
+
.to be_equivalent_to xmlpp(output)
|
568
|
+
end
|
569
|
+
|
517
570
|
it "processes notes" do
|
518
571
|
input = <<~INPUT
|
519
572
|
#{ASCIIDOC_BLANK_HDR}
|
@@ -1201,7 +1254,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1201
1254
|
the following terms and definitions apply.</p>
|
1202
1255
|
<term id="term-term1">
|
1203
1256
|
<preferred><expression><name>Term1</name></expression></preferred>
|
1204
|
-
<definition><
|
1257
|
+
<definition><verbal-definition><p id='_'>Definition 0</p></verbal-definition></definition>
|
1205
1258
|
<termsource status="identical" type="authoritative">
|
1206
1259
|
<origin bibitemid="ISO2191" type="inline" citeas="">
|
1207
1260
|
<localityStack>
|
@@ -1220,9 +1273,9 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1220
1273
|
<term id='term-term2'>
|
1221
1274
|
<preferred><expression><name>Term2</name></expression></preferred>
|
1222
1275
|
<definition>
|
1223
|
-
<
|
1276
|
+
<verbal-definition>
|
1224
1277
|
<p id='_'>Definition</p>
|
1225
|
-
</
|
1278
|
+
</verbal-definition>
|
1226
1279
|
</definition>
|
1227
1280
|
<termsource status='identical' type="authoritative">
|
1228
1281
|
<origin citeas=''>
|
@@ -1276,7 +1329,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1276
1329
|
the following terms and definitions apply.</p>
|
1277
1330
|
<term id="term-term1">
|
1278
1331
|
<preferred><expression><name>Term1</name></expression></preferred>
|
1279
|
-
<definition><
|
1332
|
+
<definition><verbal-definition><p id='_'>Definition 0</p></verbal-definition></definition>
|
1280
1333
|
<termsource status="modified" type="authoritative">
|
1281
1334
|
<origin bibitemid="ISO2191" type="inline" citeas="">
|
1282
1335
|
<localityStack>
|
@@ -1290,9 +1343,9 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1290
1343
|
</term>
|
1291
1344
|
<term id='term-term2'>
|
1292
1345
|
<preferred><expression><name>Term2</name></expression></preferred>
|
1293
|
-
<definition><
|
1346
|
+
<definition><verbal-definition>
|
1294
1347
|
<p id='_'>Definition</p>
|
1295
|
-
</
|
1348
|
+
</verbal-definition></definition>
|
1296
1349
|
<termsource status='modified' type="authoritative">
|
1297
1350
|
<origin citeas=''>
|
1298
1351
|
<termref base='IEV' target='xyz'/>
|
@@ -1342,7 +1395,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1342
1395
|
<name>Term1</name>
|
1343
1396
|
</expression>
|
1344
1397
|
</preferred>
|
1345
|
-
<definition><
|
1398
|
+
<definition><verbal-definition><p id='_'>Definition 0</p></verbal-definition></definition>
|
1346
1399
|
<termsource status='generalisation' type='authoritative'>
|
1347
1400
|
<origin bibitemid='ISO2191' type='inline' citeas=''>
|
1348
1401
|
<localityStack>
|
@@ -1362,9 +1415,9 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1362
1415
|
<name>Term2</name>
|
1363
1416
|
</expression>
|
1364
1417
|
</preferred>
|
1365
|
-
<definition><
|
1418
|
+
<definition><verbal-definition>
|
1366
1419
|
<p id='_'>Definition</p>
|
1367
|
-
</
|
1420
|
+
</verbal-definition></definition>
|
1368
1421
|
<termsource status='modified' type='lineage'>
|
1369
1422
|
<origin citeas=''>
|
1370
1423
|
<termref base='IEV' target='xyz'/>
|
@@ -1391,7 +1444,7 @@ OUTPUT
|
|
1391
1444
|
====
|
1392
1445
|
INPUT
|
1393
1446
|
output = <<~"OUTPUT"
|
1394
|
-
|
1447
|
+
#{BLANK_HDR}
|
1395
1448
|
<sections>
|
1396
1449
|
<recommendation id="_" unnumbered="true" type="verification" model="ogc" tag='X' multilingual-rendering='common'>
|
1397
1450
|
<label>/ogc/recommendation/wfs/2</label>
|
@@ -1399,7 +1452,8 @@ OUTPUT
|
|
1399
1452
|
<subject>developer, implementer</subject>
|
1400
1453
|
<inherit>/ss/584/2015/level/1</inherit>
|
1401
1454
|
<inherit>/ss/584/2015/level/2</inherit>
|
1402
|
-
<description><p id="_">I recommend this</p
|
1455
|
+
<description><p id="_">I recommend this</p>
|
1456
|
+
</description>
|
1403
1457
|
</recommendation>
|
1404
1458
|
</sections>
|
1405
1459
|
</standard-document>
|
@@ -1417,6 +1471,9 @@ OUTPUT
|
|
1417
1471
|
.Title
|
1418
1472
|
====
|
1419
1473
|
I recommend this
|
1474
|
+
|
1475
|
+
. http://www.example.com[]
|
1476
|
+
. <<ABC>>
|
1420
1477
|
====
|
1421
1478
|
INPUT
|
1422
1479
|
output = <<~OUTPUT
|
@@ -1425,7 +1482,20 @@ OUTPUT
|
|
1425
1482
|
<requirement id="ABC" subsequence="A" number="3" keep-with-next="true" keep-lines-together="true" tag='X' multilingual-rendering='common'>
|
1426
1483
|
<title>Title</title>
|
1427
1484
|
<inherit>/ss/584/2015/level/1 & /ss/584/2015/level/2</inherit>
|
1428
|
-
<description><p id="_">I recommend this</p
|
1485
|
+
<description><p id="_">I recommend this</p>
|
1486
|
+
<ol id='_' type='arabic'>
|
1487
|
+
<li>
|
1488
|
+
<p id='_'>
|
1489
|
+
<link target='http://www.example.com'/>
|
1490
|
+
</p>
|
1491
|
+
</li>
|
1492
|
+
<li>
|
1493
|
+
<p id='_'>
|
1494
|
+
<xref target='ABC'/>
|
1495
|
+
</p>
|
1496
|
+
</li>
|
1497
|
+
</ol>
|
1498
|
+
</description>
|
1429
1499
|
</requirement>
|
1430
1500
|
</sections>
|
1431
1501
|
</standard-document>
|
@@ -1473,6 +1543,9 @@ OUTPUT
|
|
1473
1543
|
[.permission]
|
1474
1544
|
=====
|
1475
1545
|
I also permit this
|
1546
|
+
|
1547
|
+
. List
|
1548
|
+
. List
|
1476
1549
|
=====
|
1477
1550
|
|
1478
1551
|
[requirement,type="general",label="/req/core/quantities-uom"]
|
@@ -1488,7 +1561,16 @@ OUTPUT
|
|
1488
1561
|
<p id="_">Example 2</p>
|
1489
1562
|
</example></description>
|
1490
1563
|
<permission id="_">
|
1491
|
-
<description><p id="_">I also permit this</p
|
1564
|
+
<description><p id="_">I also permit this</p>
|
1565
|
+
<ol id='_' type='arabic'>
|
1566
|
+
<li>
|
1567
|
+
<p id='_'>List</p>
|
1568
|
+
</li>
|
1569
|
+
<li>
|
1570
|
+
<p id='_'>List</p>
|
1571
|
+
</li>
|
1572
|
+
</ol>
|
1573
|
+
</description>
|
1492
1574
|
</permission>
|
1493
1575
|
<requirement id='_' type='general'>
|
1494
1576
|
<label>/req/core/quantities-uom</label>
|
@@ -1015,4 +1015,28 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1015
1015
|
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
1016
1016
|
.to be_equivalent_to xmlpp(output)
|
1017
1017
|
end
|
1018
|
+
|
1019
|
+
it "updates anchor reference along with anchor to match content" do
|
1020
|
+
input = <<~INPUT
|
1021
|
+
#{ASCIIDOC_BLANK_HDR}
|
1022
|
+
|
1023
|
+
[[samplecode]]
|
1024
|
+
.Sample Code
|
1025
|
+
====
|
1026
|
+
|
1027
|
+
[source,ruby]
|
1028
|
+
--
|
1029
|
+
puts "Hello, world."
|
1030
|
+
%w{a b c}.each do |x| <1>
|
1031
|
+
puts x
|
1032
|
+
end
|
1033
|
+
--
|
1034
|
+
<1> This is an annotation
|
1035
|
+
====
|
1036
|
+
INPUT
|
1037
|
+
output = Nokogiri::XML(Asciidoctor.convert(input, *OPTIONS))
|
1038
|
+
callout_id = output.at("//xmlns:callout/@target").text
|
1039
|
+
annotation_id = output.at("//xmlns:annotation/@id").text
|
1040
|
+
expect(callout_id).to eq(annotation_id)
|
1041
|
+
end
|
1018
1042
|
end
|
@@ -29,7 +29,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
29
29
|
</ul>
|
30
30
|
<term id="term-time">
|
31
31
|
<preferred><expression><name>Time</name></expression></preferred>
|
32
|
-
<definition><
|
32
|
+
<definition><verbal-definition><p id="_">This paragraph is extraneous</p></verbal-definition></definition>
|
33
33
|
</term></terms>
|
34
34
|
</sections>
|
35
35
|
</standard-document>
|
@@ -426,7 +426,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
426
426
|
<p id="_">For the purposes of this document, the following terms and definitions apply.</p>
|
427
427
|
<term id="term-term1">
|
428
428
|
<preferred><expression><name>Term1</name></expression></preferred>
|
429
|
-
<definition><
|
429
|
+
<definition><verbal-definition><p id='_'>Definition 0</p></verbal-definition></definition>
|
430
430
|
<termsource status="identical" type="authoritative">
|
431
431
|
<origin bibitemid="ISO2191" type="inline" citeas="">
|
432
432
|
<localityStack>
|
@@ -545,7 +545,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
545
545
|
<p id="_">For the purposes of this document, the following terms and definitions apply.</p>
|
546
546
|
<term id="term-automation1">
|
547
547
|
<preferred><expression><name>Automation1</name></expression></preferred>
|
548
|
-
<definition><
|
548
|
+
<definition><verbal-definition><p id='_'>Definition 1</p></verbal-definition></definition>
|
549
549
|
<termsource status="identical" type="authoritative">
|
550
550
|
<origin bibitemid="IEC60050-103" type="inline" citeas="IEC 60050-103:2009">
|
551
551
|
<localityStack>
|
@@ -556,7 +556,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
556
556
|
</term>
|
557
557
|
<term id="term-automation2">
|
558
558
|
<preferred><expression><name>Automation2</name></expression></preferred>
|
559
|
-
<definition><
|
559
|
+
<definition><verbal-definition><p id='_'>Definition 2</p></verbal-definition></definition>
|
560
560
|
<termsource status="identical" type="authoritative">
|
561
561
|
<origin bibitemid="IEC60050-102" type="inline" citeas="IEC 60050-102:2007">
|
562
562
|
<localityStack>
|
@@ -567,7 +567,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
567
567
|
</term>
|
568
568
|
<term id="term-automation3">
|
569
569
|
<preferred><expression><name>Automation3</name></expression></preferred>
|
570
|
-
<definition><
|
570
|
+
<definition><verbal-definition><p id='_'>Definition 3</p></verbal-definition></definition>
|
571
571
|
<termsource status="identical" type="authoritative">
|
572
572
|
<origin bibitemid="IEC60050-103" type="inline" citeas="IEC 60050-103:2009">
|
573
573
|
<localityStack>
|
@@ -579,7 +579,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
579
579
|
<title>Normative references</title>
|
580
580
|
#{NORM_REF_BOILERPLATE}
|
581
581
|
<bibitem type="standard" id="IEC60050-102">
|
582
|
-
<fetched
|
582
|
+
<fetched/>
|
583
583
|
<title type="title-main" format="text/plain" language="en" script="Latn">International Electrotechnical Vocabulary (IEV)</title>
|
584
584
|
<title type="title-part" format="text/plain" language="en" script="Latn">Part 102: Mathematics — General concepts and linear algebra</title>
|
585
585
|
<title type='main' format='text/plain' language='en' script='Latn'>International Electrotechnical Vocabulary (IEV) — Part 102: Mathematics — General concepts and linear algebra</title>
|
@@ -618,7 +618,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
618
618
|
</copyright>
|
619
619
|
<place>Geneva</place>
|
620
620
|
</bibitem><bibitem type="standard" id="IEC60050-103">
|
621
|
-
<fetched
|
621
|
+
<fetched/>
|
622
622
|
<title type="title-main" format="text/plain" language="en" script="Latn">International Electrotechnical Vocabulary (IEV)</title>
|
623
623
|
<title type="title-part" format="text/plain" language="en" script="Latn">Part 103: Mathematics — Functions</title>
|
624
624
|
<title type="main" format="text/plain" language="en" script="Latn">International Electrotechnical Vocabulary (IEV) — Part 103: Mathematics — Functions</title>
|