metanorma-standoc 1.6.0 → 1.6.5

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.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/rake.yml +66 -0
  3. data/README.adoc +1 -3
  4. data/lib/asciidoctor/standoc/base.rb +8 -16
  5. data/lib/asciidoctor/standoc/basicdoc.rng +32 -0
  6. data/lib/asciidoctor/standoc/cleanup.rb +52 -4
  7. data/lib/asciidoctor/standoc/cleanup_block.rb +41 -4
  8. data/lib/asciidoctor/standoc/cleanup_boilerplate.rb +14 -0
  9. data/lib/asciidoctor/standoc/cleanup_footnotes.rb +25 -0
  10. data/lib/asciidoctor/standoc/cleanup_inline.rb +6 -2
  11. data/lib/asciidoctor/standoc/cleanup_ref.rb +18 -25
  12. data/lib/asciidoctor/standoc/cleanup_terms.rb +3 -0
  13. data/lib/asciidoctor/standoc/converter.rb +61 -3
  14. data/lib/asciidoctor/standoc/front.rb +9 -3
  15. data/lib/asciidoctor/standoc/front_contributor.rb +34 -10
  16. data/lib/asciidoctor/standoc/isodoc.rng +29 -44
  17. data/lib/asciidoctor/standoc/lists.rb +4 -2
  18. data/lib/asciidoctor/standoc/macros.rb +45 -63
  19. data/lib/asciidoctor/standoc/macros_terms.rb +82 -0
  20. data/lib/asciidoctor/standoc/ref.rb +24 -36
  21. data/lib/asciidoctor/standoc/ref_sect.rb +16 -8
  22. data/lib/asciidoctor/standoc/section.rb +5 -9
  23. data/lib/asciidoctor/standoc/table.rb +12 -0
  24. data/lib/asciidoctor/standoc/term_lookup_cleanup.rb +86 -0
  25. data/lib/liquid/custom_blocks/with_json_nested_context.rb +18 -0
  26. data/lib/liquid/custom_blocks/with_yaml_nested_context.rb +19 -0
  27. data/lib/metanorma/standoc/version.rb +1 -1
  28. data/metanorma-standoc.gemspec +6 -3
  29. data/spec/asciidoctor-standoc/base_spec.rb +127 -8
  30. data/spec/asciidoctor-standoc/blocks_spec.rb +8 -8
  31. data/spec/asciidoctor-standoc/cleanup_sections_spec.rb +1514 -0
  32. data/spec/asciidoctor-standoc/cleanup_spec.rb +450 -1554
  33. data/spec/asciidoctor-standoc/isobib_cache_spec.rb +22 -31
  34. data/spec/asciidoctor-standoc/lists_spec.rb +10 -1
  35. data/spec/asciidoctor-standoc/macros_json2text_spec.rb +1 -1
  36. data/spec/asciidoctor-standoc/macros_lutaml_spec.rb +80 -0
  37. data/spec/asciidoctor-standoc/macros_plantuml_spec.rb +307 -0
  38. data/spec/asciidoctor-standoc/macros_spec.rb +378 -169
  39. data/spec/asciidoctor-standoc/macros_yaml2text_spec.rb +1 -1
  40. data/spec/asciidoctor-standoc/refs_dl_spec.rb +8 -8
  41. data/spec/asciidoctor-standoc/refs_spec.rb +350 -101
  42. data/spec/asciidoctor-standoc/section_spec.rb +11 -11
  43. data/spec/asciidoctor-standoc/table_spec.rb +86 -0
  44. data/spec/asciidoctor-standoc/validate_spec.rb +26 -0
  45. data/spec/fixtures/diagram_definitions.lutaml +22 -0
  46. data/spec/fixtures/test.exp +121 -0
  47. data/spec/spec_helper.rb +33 -0
  48. data/spec/support/shared_examples/structured_data_2_text_preprocessor.rb +156 -4
  49. data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec.yml +49 -233
  50. data/spec/vcr_cassettes/isobib_get_123.yml +12 -58
  51. data/spec/vcr_cassettes/isobib_get_123_1.yml +27 -119
  52. data/spec/vcr_cassettes/isobib_get_123_1_fr.yml +361 -0
  53. data/spec/vcr_cassettes/isobib_get_123_2001.yml +12 -58
  54. data/spec/vcr_cassettes/isobib_get_124.yml +11 -57
  55. data/spec/vcr_cassettes/rfcbib_get_rfc8341.yml +8 -8
  56. data/spec/vcr_cassettes/separates_iev_citations_by_top_level_clause.yml +276 -158
  57. metadata +61 -14
  58. data/.github/workflows/macos.yml +0 -41
  59. data/.github/workflows/ubuntu.yml +0 -45
  60. data/.github/workflows/windows.yml +0 -43
  61. data/lib/asciidoctor/standoc/base_structured_text_preprocessor.rb +0 -123
  62. data/lib/asciidoctor/standoc/json2_text_preprocessor.rb +0 -44
  63. data/lib/asciidoctor/standoc/yaml2_text_preprocessor.rb +0 -46
@@ -44,6 +44,79 @@ RSpec.describe Asciidoctor::Standoc do
44
44
  OUTPUT
45
45
  end
46
46
 
47
+ it "processes the Asciidoctor::Standoc index macros" do
48
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
49
+ #{ASCIIDOC_BLANK_HDR}
50
+ index:also[]
51
+ index:see[A]
52
+ index:also[B,C~x~]
53
+ index:see[D,_E_,F]
54
+ index:also[G,H,I,J]
55
+ index:see[K,L,M,N,O]
56
+ INPUT
57
+ #{BLANK_HDR}
58
+ <sections>
59
+ <p id='_'>
60
+ <index-xref also='true'>
61
+ <primary>B</primary>
62
+ <target>
63
+ C
64
+ <sub>x</sub>
65
+ </target>
66
+ </index-xref>
67
+ <index-xref also='false'>
68
+ <primary>D</primary>
69
+ <secondary>
70
+ <em>E</em>
71
+ </secondary>
72
+ <target>F</target>
73
+ </index-xref>
74
+ <index-xref also='true'>
75
+ <primary>G</primary>
76
+ <secondary>H</secondary>
77
+ <tertiary>I</tertiary>
78
+ <target>J</target>
79
+ </index-xref>
80
+ </p>
81
+ </sections>
82
+ </standard-document>
83
+ OUTPUT
84
+ end
85
+
86
+ it "processes the Asciidoctor::Standoc variant macros" do
87
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
88
+ #{ASCIIDOC_BLANK_HDR}
89
+ == lang:en[English] lang:fr-Latn[Français]
90
+
91
+ this lang:en[English] lang:fr-Latn[Français] section is lang:en[silly] lang:fr[fou]
92
+
93
+ INPUT
94
+ #{BLANK_HDR}
95
+ <sections>
96
+ <clause id='_' inline-header='false' obligation='normative'>
97
+ <title>
98
+ <variant lang='en'>English</variant>
99
+ <variant lang='fr' script='Latn'>Français</variant>
100
+ </title>
101
+ <p id='_'>
102
+ this
103
+ <variant>
104
+ <variant lang='en'>English</variant>
105
+ <variant lang='fr' script='Latn'>Français</variant>
106
+ </variant>
107
+ section is
108
+ <variant>
109
+ <variant lang='en'>silly</variant>
110
+ <variant lang='fr'>fou</variant>
111
+ </variant>
112
+ </p>
113
+ </clause>
114
+ </sections>
115
+ </standard-document>
116
+ OUTPUT
117
+ end
118
+
119
+
47
120
  it "processes the Asciidoctor::Standoc concept macros" do
48
121
  expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
49
122
  #{ASCIIDOC_BLANK_HDR}
@@ -295,13 +368,11 @@ OUTPUT
295
368
  <formula id='_'>
296
369
  <stem type='MathML'>
297
370
  <math xmlns='http://www.w3.org/1998/Math/MathML'>
298
- <mover>
371
+ <mover accent="true">
299
372
  <mrow>
300
373
  <mi>X</mi>
301
374
  </mrow>
302
- <mrow>
303
375
  <mo>¯</mo>
304
- </mrow>
305
376
  </mover>
306
377
  <mo>′</mo>
307
378
  <mo>=</mo>
@@ -361,198 +432,336 @@ OUTPUT
361
432
  OUTPUT
362
433
  end
363
434
 
364
- it "processes the PlantUML macro" do
365
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)).gsub(%r{plantuml/plantuml[^./]+\.}, "plantuml/_."))).to be_equivalent_to xmlpp(<<~"OUTPUT")
435
+ it "processes the footnoteblock macro" do
436
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
366
437
  #{ASCIIDOC_BLANK_HDR}
367
438
 
368
- [plantuml]
369
- ....
370
- @startuml
371
- Alice -> Bob: Authentication Request
372
- Bob --> Alice: Authentication Response
373
-
374
- Alice -> Bob: Another authentication Request
375
- Alice <-- Bob: another authentication Response
376
- @enduml
377
- ....
378
-
379
- [plantuml]
380
- ....
381
- Alice -> Bob: Authentication Request
382
- Bob --> Alice: Authentication Response
383
-
384
- Alice -> Bob: Another authentication Request
385
- Alice <-- Bob: another authentication Response
386
- ....
387
-
388
- [plantuml]
389
- ....
390
- @startuml filename
391
- Alice -> Bob: Authentication Request
392
- Bob --> Alice: Authentication Response
393
-
394
- Alice -> Bob: Another authentication Request
395
- Alice <-- Bob: another authentication Response
396
- @enduml
397
- ....
398
- INPUT
399
- #{BLANK_HDR}
400
- <sections><figure id="_">
401
- <image src="plantuml/_.png" id="_" mimetype="image/png" height="auto" width="auto"/>
402
- </figure>
403
- <figure id="_">
404
- <image src="plantuml/_.png" id="_" mimetype="image/png" height="auto" width="auto"/>
405
- </figure>
406
- <figure id="_">
407
- <image src="plantuml/filename.png" id="_" mimetype="image/png" height="auto" width="auto"/>
408
- </figure>
409
- </sections>
439
+ footnoteblock:[id1]
440
+
441
+ [[id1]]
442
+ [NOTE]
443
+ --
444
+ |===
445
+ |a |b
446
+
447
+ |c |d
448
+ |===
410
449
 
450
+ * A
451
+ * B
452
+ * C
453
+ --
454
+ INPUT
455
+ #{BLANK_HDR}
456
+ <sections>
457
+ <p id="_">
458
+ <fn reference='1'>
459
+ <table id='_'>
460
+ <thead>
461
+ <tr>
462
+ <th valign='top' align='left'>a</th>
463
+ <th valign='top' align='left'>b</th>
464
+ </tr>
465
+ </thead>
466
+ <tbody>
467
+ <tr>
468
+ <td valign='top' align='left'>c</td>
469
+ <td valign='top' align='left'>d</td>
470
+ </tr>
471
+ </tbody>
472
+ </table>
473
+ <ul id='_'>
474
+ <li>
475
+ <p id='_'>A</p>
476
+ </li>
477
+ <li>
478
+ <p id='_'>B</p>
479
+ </li>
480
+ <li>
481
+ <p id='_'>C</p>
482
+ </li>
483
+ </ul>
484
+ </fn>
485
+ </p>
486
+ </sections>
411
487
  </standard-document>
412
488
  OUTPUT
413
489
  end
414
490
 
415
- it "processes the PlantUML macro with imagesdir" do
416
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)).gsub(%r{spec/assets/[^./]+\.}, "spec/assets/_."))).to be_equivalent_to xmlpp(<<~"OUTPUT")
417
- = Document title
418
- Author
419
- :docfile: test.adoc
420
- :nodoc:
421
- :novalid:
422
- :no-isobib:
423
- :imagesdir: spec/assets
424
-
425
- [plantuml]
426
- ....
427
- @startuml
428
- Alice -> Bob: Authentication Request
429
- Bob --> Alice: Authentication Response
430
-
431
- Alice -> Bob: Another authentication Request
432
- Alice <-- Bob: another authentication Response
433
- @enduml
434
- ....
435
- INPUT
436
- #{BLANK_HDR}
437
- <sections>
438
- <figure id="_">
439
- <image src="spec/assets/_.png" id="_" mimetype="image/png" height="auto" width="auto"/>
440
- </figure>
441
- </sections>
442
- </standard-document>
443
- OUTPUT
444
- end
445
-
446
- it "processes the PlantUML macro with PlantUML disabled" do
447
- mock_plantuml_disabled
448
- expect { Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true) }.to output(%r{PlantUML not installed}).to_stderr
491
+ it "processes the footnoteblock macro with failed reference" do
492
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
449
493
  #{ASCIIDOC_BLANK_HDR}
450
494
 
451
- [plantuml]
452
- ....
453
- @startuml
454
- Alice -> Bob: Authentication Request
455
- Bob --> Alice: Authentication Response
456
-
457
- Alice -> Bob: Another authentication Request
458
- Alice <-- Bob: another authentication Response
459
- @enduml
460
- ....
461
- INPUT
495
+ footnoteblock:[id1]
462
496
 
463
- mock_plantuml_disabled
464
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
465
- #{ASCIIDOC_BLANK_HDR}
497
+ [[id2]]
498
+ [NOTE]
499
+ --
500
+ |===
501
+ |a |b
466
502
 
467
- [plantuml]
468
- ....
469
- @startuml
470
- Alice -> Bob: Authentication Request
471
- Bob --> Alice: Authentication Response
503
+ |c |d
504
+ |===
472
505
 
473
- Alice -> Bob: Another authentication Request
474
- Alice <-- Bob: another authentication Response
475
- @enduml
476
- ....
506
+ * A
507
+ * B
508
+ * C
509
+ --
477
510
  INPUT
478
- #{BLANK_HDR}
479
- <sections>
480
- <sourcecode id="_" lang="plantuml">@startuml
481
- Alice -&gt; Bob: Authentication Request
482
- Bob --&gt; Alice: Authentication Response
483
-
484
- Alice -&gt; Bob: Another authentication Request
485
- Alice &lt;-- Bob: another authentication Response
486
- @enduml</sourcecode>
487
- </sections>
511
+ #{BLANK_HDR}
512
+ <sections>
513
+ <p id='_'>
514
+ <fn reference='1'>[ERROR]</fn>
515
+ </p>
516
+ <note id='id2'>
517
+ <table id='_'>
518
+ <thead>
519
+ <tr>
520
+ <th valign='top' align='left'>a</th>
521
+ <th valign='top' align='left'>b</th>
522
+ </tr>
523
+ </thead>
524
+ <tbody>
525
+ <tr>
526
+ <td valign='top' align='left'>c</td>
527
+ <td valign='top' align='left'>d</td>
528
+ </tr>
529
+ </tbody>
530
+ </table>
531
+ <ul id='_'>
532
+ <li>
533
+ <p id='_'>A</p>
534
+ </li>
535
+ <li>
536
+ <p id='_'>B</p>
537
+ </li>
538
+ <li>
539
+ <p id='_'>C</p>
540
+ </li>
541
+ </ul>
542
+ </note>
543
+ </sections>
488
544
  </standard-document>
489
545
  OUTPUT
490
546
  end
491
547
 
492
- it "processes the PlantUML macro with localdir unwritable" do
493
- mock_localdir_unwritable
494
- expect { Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true) }.to output(%r{not writable for PlantUML}).to_stderr
495
- #{ASCIIDOC_BLANK_HDR}
548
+ describe 'term inline macros' do
549
+ subject(:convert) do
550
+ xmlpp(
551
+ strip_guid(
552
+ Asciidoctor.convert(
553
+ input, backend: :standoc, header_footer: true)))
554
+ end
555
+ let(:input) do
556
+ <<~XML
557
+ #{ASCIIDOC_BLANK_HDR}
558
+ == Terms and Definitions
496
559
 
497
- [plantuml]
498
- ....
499
- @startuml
500
- Alice -> Bob: Authentication Request
501
- Bob --> Alice: Authentication Response
560
+ === name2
502
561
 
503
- Alice -> Bob: Another authentication Request
504
- Alice <-- Bob: another authentication Response
505
- @enduml
506
- ....
507
- INPUT
562
+ == Main
508
563
 
509
- mock_localdir_unwritable
510
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
511
- #{ASCIIDOC_BLANK_HDR}
564
+ term:[name,name2] is a term
565
+ XML
566
+ end
567
+ let(:output) do
568
+ <<~XML
569
+ #{BLANK_HDR}
570
+ <sections>
571
+ <terms id='_' obligation='normative'>
572
+ <title>Terms and definitions</title>
573
+ <p id='_'>For the purposes of this document, the following terms and definitions apply.</p>
574
+ <term id='term-name2'>
575
+ <preferred>name2</preferred>
576
+ </term>
577
+ </terms>
578
+ <clause id='_' inline-header='false' obligation='normative'>
579
+ <title>Main</title>
580
+ <p id='_'>
581
+ <em>name</em>
582
+ (
583
+ <xref target='term-name2'/>
584
+ ) is a term
585
+ </p>
586
+ </clause>
587
+ </sections>
588
+ </standard-document>
589
+ XML
590
+ end
512
591
 
513
- [plantuml]
514
- ....
515
- @startuml
516
- Alice -> Bob: Authentication Request
517
- Bob --> Alice: Authentication Response
592
+ it 'converts macro into the correct xml' do
593
+ expect(convert).to(be_equivalent_to(xmlpp(output)))
594
+ end
518
595
 
519
- Alice -> Bob: Another authentication Request
520
- Alice <-- Bob: another authentication Response
521
- @enduml
522
- ....
523
- INPUT
524
- #{BLANK_HDR}
525
- <sections>
526
- <sourcecode id="_" lang="plantuml">@startuml
527
- Alice -&gt; Bob: Authentication Request
528
- Bob --&gt; Alice: Authentication Response
529
-
530
- Alice -&gt; Bob: Another authentication Request
531
- Alice &lt;-- Bob: another authentication Response
532
- @enduml</sourcecode>
533
- </sections>
534
- </standard-document>
535
- OUTPUT
536
- end
596
+ context 'default params' do
597
+ let(:input) do
598
+ <<~XML
599
+ #{ASCIIDOC_BLANK_HDR}
600
+
601
+ == Terms and Definitions
602
+
603
+ === name
537
604
 
538
- private
605
+ == Main
539
606
 
540
- def mock_plantuml_disabled
541
- expect(Asciidoctor::Standoc::PlantUMLBlockMacroBackend).to receive(:plantuml_installed?) do
542
- raise "PlantUML not installed"
543
- false
607
+ term:[name] is a term
608
+ XML
609
+ end
610
+ let(:output) do
611
+ <<~XML
612
+ #{BLANK_HDR}
613
+ <sections>
614
+ <terms id='_' obligation='normative'>
615
+ <title>Terms and definitions</title>
616
+ <p id='_'>For the purposes of this document, the following terms and definitions apply.</p>
617
+ <term id='term-name'>
618
+ <preferred>name</preferred>
619
+ </term>
620
+ </terms>
621
+ <clause id='_' inline-header='false' obligation='normative'>
622
+ <title>Main</title>
623
+ <p id='_'>
624
+ <em>name</em>
625
+ (
626
+ <xref target='term-name' />
627
+ ) is a term
628
+ </p>
629
+ </clause>
630
+ </sections>
631
+ </standard-document>
632
+ XML
633
+ end
634
+
635
+ it 'uses `name` as termref name' do
636
+ expect(convert).to(be_equivalent_to(xmlpp(output)))
637
+ end
544
638
  end
545
- end
546
639
 
547
- def mock_localdir_unwritable
548
- expect(Asciidoctor::Standoc::Utils).to receive(:localdir) do
549
- "/"
550
- end.exactly(2).times
551
- end
640
+ context 'multiply exising ids in document' do
641
+ let(:input) do
642
+ <<~XML
643
+ #{ASCIIDOC_BLANK_HDR}
644
+
645
+ == Terms and Definitions
646
+
647
+ === name
648
+ === name2
649
+
650
+ [[term-name]]
651
+ == Main
552
652
 
553
- def mock_localdir_unwritable
554
- expect(File).to receive(:writable?) do
555
- false
653
+ paragraph
654
+
655
+ [[term-name2]]
656
+ == Second
657
+
658
+ term:[name] is a term
659
+ term:[name2] is a term
660
+ XML
661
+ end
662
+ let(:output) do
663
+ <<~XML
664
+ #{BLANK_HDR}
665
+ <sections>
666
+ <terms id='_' obligation='normative'>
667
+ <title>Terms and definitions</title>
668
+ <p id='_'>For the purposes of this document, the following terms and definitions apply.</p>
669
+ <term id='term-name-1'>
670
+ <preferred>name</preferred>
671
+ </term>
672
+ <term id='term-name2-1'>
673
+ <preferred>name2</preferred>
674
+ </term>
675
+ </terms>
676
+ <clause id='term-name' inline-header='false' obligation='normative'>
677
+ <title>Main</title>
678
+ <p id='_'>paragraph</p>
679
+ </clause>
680
+ <clause id='term-name2' inline-header='false' obligation='normative'>
681
+ <title>Second</title>
682
+ <p id='_'>
683
+ <em>name</em>
684
+ (
685
+ <xref target='term-name-1' />
686
+ ) is a term
687
+ <em>name2</em>
688
+ (
689
+ <xref target='term-name2-1' />
690
+ ) is a term
691
+ </p>
692
+ </clause>
693
+ </sections>
694
+ </standard-document>
695
+ XML
696
+ end
697
+
698
+ it 'generates unique ids which do not match existing ids' do
699
+ expect(convert).to(be_equivalent_to(xmlpp(output)))
700
+ end
556
701
  end
557
- end
702
+
703
+ context 'when missing actual ref' do
704
+ let(:input) do
705
+ <<~XML
706
+ #{ASCIIDOC_BLANK_HDR}
707
+
708
+ == Terms and Definitions
709
+
710
+ === name identity
711
+
712
+ [[name-check]]
713
+ === name check
714
+
715
+ paragraph
716
+
717
+ term:[name check] is a term
718
+
719
+ term:[name identity] is a term
720
+
721
+ Moreover, term:[missing] is a term
722
+ XML
723
+ end
724
+ let(:output) do
725
+ <<~XML
726
+ #{BLANK_HDR}
727
+ <sections>
728
+ <terms id='_' obligation='normative'>
729
+ <title>Terms and definitions</title>
730
+ <p id='_'>For the purposes of this document, the following terms and definitions apply.</p>
731
+ <term id='term-name-identity'>
732
+ <preferred>name identity</preferred>
733
+ </term>
734
+ <term id='name-check'>
735
+ <preferred>name check</preferred>
736
+ <definition>
737
+ <p id='_'>paragraph</p>
738
+ <p id='_'>
739
+ <em>name check</em>
740
+ (
741
+ <xref target='name-check'/>
742
+ ) is a term
743
+ </p>
744
+ <p id='_'>
745
+ <em>name identity</em>
746
+ (
747
+ <xref target='term-name-identity'/>
748
+ ) is a term
749
+ </p>
750
+ <p id="_">Moreover, (<strong>term “missing” not resolved</strong>) is a term
751
+ </p>
752
+ </definition>
753
+ </term>
754
+ </terms>
755
+ </sections>
756
+ </standard-document>
757
+ XML
758
+ end
759
+
760
+ it 'generates unique ids which do not match existing ids' do
761
+ expect(convert).to(be_equivalent_to(xmlpp(output)))
762
+ end
763
+ end
764
+
765
+ end
766
+
558
767
  end