metanorma-standoc 1.10.4.1 → 1.10.8
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/lib/asciidoctor/standoc/base.rb +11 -13
- data/lib/asciidoctor/standoc/basicdoc.rng +21 -4
- data/lib/asciidoctor/standoc/blocks.rb +27 -22
- data/lib/asciidoctor/standoc/blocks_notes.rb +17 -22
- data/lib/asciidoctor/standoc/cleanup.rb +38 -71
- data/lib/asciidoctor/standoc/cleanup_block.rb +5 -70
- data/lib/asciidoctor/standoc/cleanup_image.rb +6 -7
- data/lib/asciidoctor/standoc/cleanup_inline.rb +27 -98
- data/lib/asciidoctor/standoc/cleanup_maths.rb +113 -21
- data/lib/asciidoctor/standoc/cleanup_ref.rb +5 -0
- data/lib/asciidoctor/standoc/cleanup_reqt.rb +56 -18
- data/lib/asciidoctor/standoc/cleanup_section.rb +1 -0
- data/lib/asciidoctor/standoc/cleanup_section_names.rb +31 -14
- data/lib/asciidoctor/standoc/cleanup_table.rb +68 -0
- data/lib/asciidoctor/standoc/cleanup_terms.rb +1 -1
- data/lib/asciidoctor/standoc/cleanup_text.rb +73 -0
- data/lib/asciidoctor/standoc/cleanup_xref.rb +107 -0
- data/lib/asciidoctor/standoc/converter.rb +13 -0
- data/lib/asciidoctor/standoc/isodoc.rng +241 -61
- data/lib/asciidoctor/standoc/lists.rb +15 -15
- data/lib/asciidoctor/standoc/macros.rb +14 -43
- data/lib/asciidoctor/standoc/macros_note.rb +45 -0
- data/lib/asciidoctor/standoc/macros_terms.rb +33 -15
- data/lib/asciidoctor/standoc/reqt.rb +2 -2
- data/lib/asciidoctor/standoc/reqt.rng +23 -2
- data/lib/asciidoctor/standoc/table.rb +22 -20
- data/lib/asciidoctor/standoc/terms.rb +9 -1
- data/lib/asciidoctor/standoc/validate.rb +23 -14
- 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 +0 -33
- data/spec/asciidoctor/blank_spec.rb +37 -0
- data/spec/asciidoctor/blocks_spec.rb +151 -30
- data/spec/asciidoctor/cleanup_blocks_spec.rb +1018 -0
- data/spec/asciidoctor/cleanup_sections_spec.rb +207 -0
- data/spec/asciidoctor/cleanup_spec.rb +193 -1078
- data/spec/asciidoctor/inline_spec.rb +36 -0
- data/spec/asciidoctor/isobib_cache_spec.rb +8 -8
- data/spec/asciidoctor/lists_spec.rb +6 -6
- data/spec/asciidoctor/macros_plantuml_spec.rb +1 -1
- data/spec/asciidoctor/macros_spec.rb +41 -26
- data/spec/asciidoctor/refs_dl_spec.rb +1 -1
- data/spec/asciidoctor/refs_spec.rb +220 -444
- data/spec/asciidoctor/section_spec.rb +1 -1
- data/spec/asciidoctor/validate_spec.rb +51 -0
- data/spec/assets/xref_error.adoc +1 -0
- data/spec/fixtures/datamodel_description_sections_tree.xml +24 -24
- data/spec/spec_helper.rb +5 -7
- data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec.yml +231 -143
- data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec1.yml +152 -0
- data/spec/vcr_cassettes/isobib_get_123.yml +52 -36
- data/spec/vcr_cassettes/isobib_get_123_1.yml +103 -71
- data/spec/vcr_cassettes/isobib_get_123_1_fr.yml +112 -80
- data/spec/vcr_cassettes/isobib_get_123_2001.yml +50 -34
- data/spec/vcr_cassettes/isobib_get_124.yml +51 -35
- data/spec/vcr_cassettes/rfcbib_get_rfc8341.yml +16 -16
- data/spec/vcr_cassettes/separates_iev_citations_by_top_level_clause.yml +70 -46
- metadata +11 -4
@@ -72,7 +72,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
72
72
|
#{ASCIIDOC_BLANK_HDR}
|
73
73
|
|
74
74
|
[[ABC]]
|
75
|
-
[stem%inequality,number=3,keep-with-next=true,keep-lines-together=true]
|
75
|
+
[stem%inequality,number=3,keep-with-next=true,keep-lines-together=true,tag=X,multilingual-rendering=common]
|
76
76
|
++++
|
77
77
|
r = 1 %
|
78
78
|
r = 1 %
|
@@ -97,7 +97,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
97
97
|
output = <<~OUTPUT
|
98
98
|
#{BLANK_HDR}
|
99
99
|
<sections>
|
100
|
-
<formula id='ABC' number='3' keep-with-next='true' keep-lines-together='true' inequality='true'>
|
100
|
+
<formula id='ABC' number='3' keep-with-next='true' keep-lines-together='true' inequality='true' tag='X' multilingual-rendering='common'>
|
101
101
|
<stem type='MathML'>
|
102
102
|
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
103
103
|
<mi>r</mi>
|
@@ -317,6 +317,88 @@ RSpec.describe Asciidoctor::Standoc do
|
|
317
317
|
.to be_equivalent_to xmlpp(output)
|
318
318
|
end
|
319
319
|
|
320
|
+
it "processes multiple term definitions" do
|
321
|
+
input = <<~INPUT
|
322
|
+
#{ASCIIDOC_BLANK_HDR}
|
323
|
+
== Terms and Definitions
|
324
|
+
|
325
|
+
=== Term1
|
326
|
+
|
327
|
+
[.definition]
|
328
|
+
--
|
329
|
+
first definition
|
330
|
+
|
331
|
+
[.source]
|
332
|
+
<<ISO2191,section=1>>
|
333
|
+
--
|
334
|
+
|
335
|
+
[.definition]
|
336
|
+
--
|
337
|
+
second definition
|
338
|
+
|
339
|
+
[.source]
|
340
|
+
<<ISO2191,section=2>>
|
341
|
+
--
|
342
|
+
|
343
|
+
NOTE: This is a note
|
344
|
+
|
345
|
+
[.source]
|
346
|
+
<<ISO2191,section=3>>
|
347
|
+
|
348
|
+
INPUT
|
349
|
+
output = <<~OUTPUT
|
350
|
+
#{BLANK_HDR}
|
351
|
+
<sections>
|
352
|
+
<terms id='_' obligation='normative'>
|
353
|
+
<title>Terms and definitions</title>
|
354
|
+
<p id='_'>For the purposes of this document, the following terms and definitions apply.</p>
|
355
|
+
<term id='term-term1'>
|
356
|
+
<preferred>Term1</preferred>
|
357
|
+
<definition>
|
358
|
+
<p id='_'>first definition</p>
|
359
|
+
<termsource status='identical'>
|
360
|
+
<origin bibitemid='ISO2191' type='inline' citeas=''>
|
361
|
+
<localityStack>
|
362
|
+
<locality type='section'>
|
363
|
+
<referenceFrom>1</referenceFrom>
|
364
|
+
</locality>
|
365
|
+
</localityStack>
|
366
|
+
</origin>
|
367
|
+
</termsource>
|
368
|
+
</definition>
|
369
|
+
<definition>
|
370
|
+
<p id='_'>second definition</p>
|
371
|
+
<termsource status='identical'>
|
372
|
+
<origin bibitemid='ISO2191' type='inline' citeas=''>
|
373
|
+
<localityStack>
|
374
|
+
<locality type='section'>
|
375
|
+
<referenceFrom>2</referenceFrom>
|
376
|
+
</locality>
|
377
|
+
</localityStack>
|
378
|
+
</origin>
|
379
|
+
</termsource>
|
380
|
+
</definition>
|
381
|
+
<termnote id='_'>
|
382
|
+
<p id='_'>This is a note</p>
|
383
|
+
</termnote>
|
384
|
+
<termsource status='identical'>
|
385
|
+
<origin bibitemid='ISO2191' type='inline' citeas=''>
|
386
|
+
<localityStack>
|
387
|
+
<locality type='section'>
|
388
|
+
<referenceFrom>3</referenceFrom>
|
389
|
+
</locality>
|
390
|
+
</localityStack>
|
391
|
+
</origin>
|
392
|
+
</termsource>
|
393
|
+
</term>
|
394
|
+
</terms>
|
395
|
+
</sections>
|
396
|
+
</standard-document>
|
397
|
+
OUTPUT
|
398
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
399
|
+
.to be_equivalent_to xmlpp(output)
|
400
|
+
end
|
401
|
+
|
320
402
|
it "processes term notes" do
|
321
403
|
input = <<~INPUT
|
322
404
|
#{ASCIIDOC_BLANK_HDR}
|
@@ -326,7 +408,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
326
408
|
|
327
409
|
NOTE: This is a note
|
328
410
|
|
329
|
-
[NOTE,keep-separate=true]
|
411
|
+
[NOTE,keep-separate=true,tag=X,multilingual-rendering=common]
|
330
412
|
====
|
331
413
|
XYZ
|
332
414
|
====
|
@@ -342,7 +424,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
342
424
|
<termnote id="_">
|
343
425
|
<p id="_">This is a note</p>
|
344
426
|
</termnote>
|
345
|
-
<termnote id='_'>
|
427
|
+
<termnote id='_' tag='X' multilingual-rendering='common'>
|
346
428
|
<p id='_'>XYZ</p>
|
347
429
|
</termnote>
|
348
430
|
</term>
|
@@ -438,7 +520,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
438
520
|
[[ABC]]
|
439
521
|
NOTE: This is a note
|
440
522
|
|
441
|
-
[NOTE,keep-separate=true,number=7,subsequence=A,beforeclauses=true,keep-with-next=true,keep-lines-together=true,type=classified]
|
523
|
+
[NOTE,keep-separate=true,number=7,subsequence=A,beforeclauses=true,keep-with-next=true,keep-lines-together=true,type=classified,tag=X,multilingual-rendering=common]
|
442
524
|
====
|
443
525
|
XYZ
|
444
526
|
====
|
@@ -451,7 +533,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
451
533
|
<p id="_">This is a note</p>
|
452
534
|
</note>
|
453
535
|
</foreword></preface><sections>
|
454
|
-
<note id='_' number="7" subsequence="A" keep-with-next="true" keep-lines-together="true" type="classified">
|
536
|
+
<note id='_' number="7" subsequence="A" keep-with-next="true" keep-lines-together="true" type="classified" tag='X' multilingual-rendering='common'>
|
455
537
|
<p id='_'>XYZ</p>
|
456
538
|
</note>
|
457
539
|
<clause id="_" inline-header="false" obligation="normative">
|
@@ -473,7 +555,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
473
555
|
#{ASCIIDOC_BLANK_HDR}
|
474
556
|
|
475
557
|
[[ABC]]
|
476
|
-
[alt=Literal,keep-with-next=true,keep-lines-together=true]
|
558
|
+
[alt=Literal,keep-with-next=true,keep-lines-together=true,tag=X,multilingual-rendering=common]
|
477
559
|
....
|
478
560
|
<LITERAL>
|
479
561
|
FIGURATIVE
|
@@ -482,7 +564,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
482
564
|
output = <<~OUTPUT
|
483
565
|
#{BLANK_HDR}
|
484
566
|
<sections>
|
485
|
-
<figure id="ABC" keep-with-next="true" keep-lines-together="true">
|
567
|
+
<figure id="ABC" keep-with-next="true" keep-lines-together="true" tag='X' multilingual-rendering='common'>
|
486
568
|
<pre alt="Literal" id="_"><LITERAL>
|
487
569
|
FIGURATIVE
|
488
570
|
</pre>
|
@@ -519,7 +601,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
519
601
|
#{ASCIIDOC_BLANK_HDR}
|
520
602
|
|
521
603
|
[[ABC]]
|
522
|
-
[CAUTION,type=Safety Precautions,keep-with-next="true",keep-lines-together="true"]
|
604
|
+
[CAUTION,type=Safety Precautions,keep-with-next="true",keep-lines-together="true",tag=X,multilingual-rendering=common]
|
523
605
|
.Precautions
|
524
606
|
====
|
525
607
|
While werewolves are hardy community members, keep in mind the following dietary concerns:
|
@@ -532,7 +614,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
532
614
|
output = <<~OUTPUT
|
533
615
|
#{BLANK_HDR}
|
534
616
|
<sections>
|
535
|
-
<admonition id="ABC" type="safety precautions" keep-with-next="true" keep-lines-together="true">
|
617
|
+
<admonition id="ABC" type="safety precautions" keep-with-next="true" keep-lines-together="true" tag='X' multilingual-rendering='common'>
|
536
618
|
<name>Precautions</name><p id="_">While werewolves are hardy community members, keep in mind the following dietary concerns:</p>
|
537
619
|
<ol id="_" type="arabic">
|
538
620
|
<li>
|
@@ -561,7 +643,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
561
643
|
=== Term1
|
562
644
|
|
563
645
|
[[ABC]]
|
564
|
-
[example]
|
646
|
+
[example,tag=X,multilingual-rendering=common]
|
565
647
|
This is an example
|
566
648
|
INPUT
|
567
649
|
output = <<~OUTPUT
|
@@ -572,7 +654,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
572
654
|
<p id="_">For the purposes of this document, the following terms and definitions apply.</p>
|
573
655
|
<term id="term-term1">
|
574
656
|
<preferred>Term1</preferred>
|
575
|
-
<termexample id="ABC">
|
657
|
+
<termexample id="ABC" tag='X' multilingual-rendering='common'>
|
576
658
|
<p id="_">This is an example</p>
|
577
659
|
</termexample></term>
|
578
660
|
</terms>
|
@@ -651,7 +733,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
651
733
|
#{ASCIIDOC_BLANK_HDR}
|
652
734
|
|
653
735
|
[[ABC]]
|
654
|
-
[example,subsequence=A,keep-with-next=true,keep-lines-together=next]
|
736
|
+
[example,subsequence=A,keep-with-next=true,keep-lines-together=next,tag=X,multilingual-rendering=common]
|
655
737
|
.Title
|
656
738
|
====
|
657
739
|
This is an example
|
@@ -672,7 +754,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
672
754
|
output = <<~OUTPUT
|
673
755
|
#{BLANK_HDR}
|
674
756
|
<sections>
|
675
|
-
<example id="ABC" subsequence="A" keep-with-next='true' keep-lines-together='next'>
|
757
|
+
<example id="ABC" subsequence="A" keep-with-next='true' keep-lines-together='next' tag='X' multilingual-rendering='common'>
|
676
758
|
<name>Title</name>
|
677
759
|
<p id="_">This is an example</p>
|
678
760
|
<p id="_">Amen</p></example>
|
@@ -858,7 +940,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
858
940
|
it "accepts attributes on images" do
|
859
941
|
input = <<~INPUT
|
860
942
|
#{ASCIIDOC_BLANK_HDR}
|
861
|
-
[height=4,width=3,alt="IMAGE",filename="riceimg1.png",titleattr="TITLE"]
|
943
|
+
[height=4,width=3,alt="IMAGE",filename="riceimg1.png",titleattr="TITLE",tag=X,multilingual-rendering=common]
|
862
944
|
.Caption
|
863
945
|
image::spec/examples/rice_images/rice_image1.png[]
|
864
946
|
|
@@ -866,7 +948,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
866
948
|
output = <<~OUTPUT
|
867
949
|
#{BLANK_HDR}
|
868
950
|
<sections>
|
869
|
-
<figure id="_"><name>Caption</name>
|
951
|
+
<figure id="_" tag='X' multilingual-rendering='common'><name>Caption</name>
|
870
952
|
<image src="spec/examples/rice_images/rice_image1.png" id="_" mimetype="image/png" height="4" width="3" title="TITLE" alt="IMAGE" filename="riceimg1.png"/>
|
871
953
|
</figure>
|
872
954
|
</sections>
|
@@ -933,13 +1015,13 @@ RSpec.describe Asciidoctor::Standoc do
|
|
933
1015
|
it "accepts attributes on paragraphs" do
|
934
1016
|
input = <<~INPUT
|
935
1017
|
#{ASCIIDOC_BLANK_HDR}
|
936
|
-
[align=right,keep-with-next=true,keep-lines-together=true]
|
1018
|
+
[align=right,keep-with-next=true,keep-lines-together=true,tag=X,multilingual-rendering=common]
|
937
1019
|
This para is right-aligned.
|
938
1020
|
INPUT
|
939
1021
|
output = <<~OUTPUT
|
940
1022
|
#{BLANK_HDR}
|
941
1023
|
<sections>
|
942
|
-
<p align="right" id="_" keep-with-next="true" keep-lines-together="true">This para is right-aligned.</p>
|
1024
|
+
<p align="right" id="_" keep-with-next="true" keep-lines-together="true" tag='X' multilingual-rendering='common'>This para is right-aligned.</p>
|
943
1025
|
</sections>
|
944
1026
|
</standard-document>
|
945
1027
|
OUTPUT
|
@@ -952,7 +1034,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
952
1034
|
#{ASCIIDOC_BLANK_HDR}
|
953
1035
|
|
954
1036
|
[[ABC]]
|
955
|
-
[quote, ISO, "ISO7301,section 1",align="right",keep-with-next=true,keep-lines-together=true]
|
1037
|
+
[quote, ISO, "ISO7301,section 1",align="right",keep-with-next=true,keep-lines-together=true,tag=X,multilingual-rendering=common]
|
956
1038
|
____
|
957
1039
|
Block quotation
|
958
1040
|
____
|
@@ -960,7 +1042,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
960
1042
|
output = <<~OUTPUT
|
961
1043
|
#{BLANK_HDR}
|
962
1044
|
<sections>
|
963
|
-
<quote id="ABC" align="right" keep-with-next="true" keep-lines-together="true">
|
1045
|
+
<quote id="ABC" align="right" keep-with-next="true" keep-lines-together="true" tag='X' multilingual-rendering='common'>
|
964
1046
|
<source type="inline" bibitemid="ISO7301" citeas="">
|
965
1047
|
<localityStack>
|
966
1048
|
<locality type="section"><referenceFrom>1</referenceFrom></locality>
|
@@ -982,7 +1064,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
982
1064
|
|
983
1065
|
[[ABC]]
|
984
1066
|
.Caption
|
985
|
-
[source%unnumbered,ruby,number=3,filename=sourcecode1.rb,keep-with-next=true,keep-lines-together=true]
|
1067
|
+
[source%unnumbered,ruby,number=3,filename=sourcecode1.rb,keep-with-next=true,keep-lines-together=true,tag=X,multilingual-rendering=common]
|
986
1068
|
--
|
987
1069
|
puts "Hello, world."
|
988
1070
|
%w{a b c}.each do |x|
|
@@ -993,7 +1075,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
993
1075
|
output = <<~OUTPUT
|
994
1076
|
#{BLANK_HDR}
|
995
1077
|
<sections>
|
996
|
-
<sourcecode id="ABC" lang="ruby" filename="sourcecode1.rb" unnumbered="true" number="3" keep-with-next="true" keep-lines-together="true">
|
1078
|
+
<sourcecode id="ABC" lang="ruby" filename="sourcecode1.rb" unnumbered="true" number="3" keep-with-next="true" keep-lines-together="true" tag='X' multilingual-rendering='common'>
|
997
1079
|
<name>Caption</name>puts "Hello, world."
|
998
1080
|
%w{a b c}.each do |x|
|
999
1081
|
puts x
|
@@ -1175,7 +1257,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1175
1257
|
it "processes recommendation" do
|
1176
1258
|
input = <<~"INPUT"
|
1177
1259
|
#{ASCIIDOC_BLANK_HDR}
|
1178
|
-
[.recommendation,label="/ogc/recommendation/wfs/2",subject="user;developer, implementer",inherit="/ss/584/2015/level/1; /ss/584/2015/level/2",options="unnumbered",type=verification,model=ogc]
|
1260
|
+
[.recommendation,label="/ogc/recommendation/wfs/2",subject="user;developer, implementer",inherit="/ss/584/2015/level/1; /ss/584/2015/level/2",options="unnumbered",type=verification,model=ogc,tag=X,multilingual-rendering=common]
|
1179
1261
|
====
|
1180
1262
|
I recommend this
|
1181
1263
|
====
|
@@ -1183,7 +1265,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1183
1265
|
output = <<~"OUTPUT"
|
1184
1266
|
#{BLANK_HDR}
|
1185
1267
|
<sections>
|
1186
|
-
<recommendation id="_" unnumbered="true" type="verification" model="ogc">
|
1268
|
+
<recommendation id="_" unnumbered="true" type="verification" model="ogc" tag='X' multilingual-rendering='common'>
|
1187
1269
|
<label>/ogc/recommendation/wfs/2</label>
|
1188
1270
|
<subject>user</subject>
|
1189
1271
|
<subject>developer, implementer</subject>
|
@@ -1203,7 +1285,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1203
1285
|
input = <<~"INPUT"
|
1204
1286
|
#{ASCIIDOC_BLANK_HDR}
|
1205
1287
|
[[ABC]]
|
1206
|
-
[.requirement,subsequence="A",inherit="/ss/584/2015/level/1 & /ss/584/2015/level/2",number=3,keep-with-next=true,keep-lines-together=true]
|
1288
|
+
[.requirement,subsequence="A",inherit="/ss/584/2015/level/1 & /ss/584/2015/level/2",number=3,keep-with-next=true,keep-lines-together=true,tag=X,multilingual-rendering=common]
|
1207
1289
|
.Title
|
1208
1290
|
====
|
1209
1291
|
I recommend this
|
@@ -1212,7 +1294,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1212
1294
|
output = <<~OUTPUT
|
1213
1295
|
#{BLANK_HDR}
|
1214
1296
|
<sections>
|
1215
|
-
<requirement id="ABC" subsequence="A" number="3" keep-with-next="true" keep-lines-together="true">
|
1297
|
+
<requirement id="ABC" subsequence="A" number="3" keep-with-next="true" keep-lines-together="true" tag='X' multilingual-rendering='common'>
|
1216
1298
|
<title>Title</title>
|
1217
1299
|
<inherit>/ss/584/2015/level/1 & /ss/584/2015/level/2</inherit>
|
1218
1300
|
<description><p id="_">I recommend this</p></description>
|
@@ -1230,7 +1312,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1230
1312
|
#{ASCIIDOC_BLANK_HDR}
|
1231
1313
|
|
1232
1314
|
[[ABC]]
|
1233
|
-
[.permission]
|
1315
|
+
[.permission,tag=X,multilingual-rendering=common]
|
1234
1316
|
====
|
1235
1317
|
I recommend this
|
1236
1318
|
====
|
@@ -1238,7 +1320,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1238
1320
|
output = <<~"OUTPUT"
|
1239
1321
|
#{BLANK_HDR}
|
1240
1322
|
<sections>
|
1241
|
-
<permission id="ABC">
|
1323
|
+
<permission id="ABC" tag='X' multilingual-rendering='common'>
|
1242
1324
|
<description><p id="_">I recommend this</p></description>
|
1243
1325
|
</permission>
|
1244
1326
|
</sections>
|
@@ -1264,10 +1346,14 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1264
1346
|
=====
|
1265
1347
|
I also permit this
|
1266
1348
|
=====
|
1349
|
+
|
1350
|
+
[requirement,type="general",label="/req/core/quantities-uom"]
|
1351
|
+
======
|
1352
|
+
======
|
1267
1353
|
====
|
1268
1354
|
INPUT
|
1269
1355
|
output = <<~"OUTPUT"
|
1270
|
-
|
1356
|
+
#{BLANK_HDR}
|
1271
1357
|
<sections>
|
1272
1358
|
<permission id="_"><description><p id="_">I permit this</p>
|
1273
1359
|
<example id="_">
|
@@ -1275,7 +1361,11 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1275
1361
|
</example></description>
|
1276
1362
|
<permission id="_">
|
1277
1363
|
<description><p id="_">I also permit this</p></description>
|
1278
|
-
</permission
|
1364
|
+
</permission>
|
1365
|
+
<requirement id='_' type='general'>
|
1366
|
+
<label>/req/core/quantities-uom</label>
|
1367
|
+
</requirement>
|
1368
|
+
</permission>
|
1279
1369
|
</sections>
|
1280
1370
|
</standard-document>
|
1281
1371
|
OUTPUT
|
@@ -1515,4 +1605,35 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1515
1605
|
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
1516
1606
|
.to be_equivalent_to xmlpp(output)
|
1517
1607
|
end
|
1608
|
+
|
1609
|
+
it "processes hard breaks" do
|
1610
|
+
input = <<~INPUT
|
1611
|
+
#{ASCIIDOC_BLANK_HDR}
|
1612
|
+
|
1613
|
+
[%hardbreaks]
|
1614
|
+
One hardbreak
|
1615
|
+
Two
|
1616
|
+
|
1617
|
+
Three hardbreaks +
|
1618
|
+
Four
|
1619
|
+
INPUT
|
1620
|
+
output = <<~OUTPUT
|
1621
|
+
#{BLANK_HDR}
|
1622
|
+
<sections>
|
1623
|
+
<p id='_'>
|
1624
|
+
One hardbreak
|
1625
|
+
<br/>
|
1626
|
+
Two
|
1627
|
+
</p>
|
1628
|
+
<p id='_'>
|
1629
|
+
Three hardbreaks
|
1630
|
+
<br/>
|
1631
|
+
Four
|
1632
|
+
</p>
|
1633
|
+
</sections>
|
1634
|
+
</standard-document>
|
1635
|
+
OUTPUT
|
1636
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
1637
|
+
.to be_equivalent_to xmlpp(output)
|
1638
|
+
end
|
1518
1639
|
end
|