metanorma-standoc 2.1.0 → 2.1.3
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/lib/metanorma/standoc/base.rb +3 -1
- data/lib/metanorma/standoc/biblio.rng +134 -39
- data/lib/metanorma/standoc/blocks.rb +8 -6
- data/lib/metanorma/standoc/blocks_notes.rb +3 -0
- data/lib/metanorma/standoc/cleanup.rb +1 -0
- data/lib/metanorma/standoc/cleanup_footnotes.rb +14 -9
- data/lib/metanorma/standoc/cleanup_inline.rb +17 -0
- data/lib/metanorma/standoc/cleanup_reqt.rb +1 -1
- data/lib/metanorma/standoc/cleanup_terms.rb +3 -1
- data/lib/metanorma/standoc/cleanup_text.rb +9 -4
- data/lib/metanorma/standoc/cleanup_xref.rb +2 -1
- data/lib/metanorma/standoc/converter.rb +2 -0
- data/lib/metanorma/standoc/inline.rb +2 -1
- data/lib/metanorma/standoc/isodoc.rng +16 -0
- data/lib/metanorma/standoc/lists.rb +8 -3
- data/lib/metanorma/standoc/macros.rb +31 -4
- data/lib/metanorma/standoc/macros_form.rb +1 -1
- data/lib/metanorma/standoc/macros_note.rb +1 -6
- data/lib/metanorma/standoc/ref_sect.rb +2 -1
- data/lib/metanorma/standoc/reqt.rb +5 -3
- data/lib/metanorma/standoc/section.rb +1 -1
- data/lib/metanorma/standoc/version.rb +1 -1
- data/metanorma-standoc.gemspec +2 -2
- data/spec/metanorma/base_spec.rb +41 -5
- data/spec/metanorma/blocks_spec.rb +53 -1
- data/spec/metanorma/cleanup_sections_spec.rb +5 -5
- data/spec/metanorma/cleanup_spec.rb +6 -6
- data/spec/metanorma/cleanup_terms_spec.rb +1 -1
- data/spec/metanorma/inline_spec.rb +3 -3
- data/spec/metanorma/lists_spec.rb +10 -4
- data/spec/metanorma/macros_spec.rb +21 -12
- data/spec/metanorma/refs_spec.rb +112 -118
- data/spec/metanorma/table_spec.rb +24 -6
- data/spec/spec_helper.rb +1 -1
- data/spec/vcr_cassettes/bsi16341.yml +69 -69
- data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec.yml +89 -89
- data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec1.yml +12 -12
- data/spec/vcr_cassettes/hide_refs.yml +55 -55
- data/spec/vcr_cassettes/isobib_get_123.yml +14 -14
- data/spec/vcr_cassettes/isobib_get_123_1.yml +28 -28
- data/spec/vcr_cassettes/isobib_get_123_1_fr.yml +35 -35
- 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 +228 -52
- data/spec/vcr_cassettes/separates_iev_citations_by_top_level_clause.yml +56 -58
- data/spec/vcr_cassettes/std-link.yml +17 -17
- metadata +9 -10
- data/docs/quickstart.adoc +0 -375
    
        data/spec/metanorma/refs_spec.rb
    CHANGED
    
    | @@ -1656,127 +1656,121 @@ RSpec.describe Metanorma::Standoc do | |
| 1656 1656 | 
             
                    <clause id="_" inline-header="false" obligation="normative">
         | 
| 1657 1657 | 
             
                      <title>Clause 4</title>
         | 
| 1658 1658 | 
             
                      <p id="_">
         | 
| 1659 | 
            -
                      <eref type="inline" bibitemid="iso123" citeas="RFC 8341"/>
         | 
| 1659 | 
            +
                      <eref type="inline" bibitemid="iso123" citeas="IETF RFC 8341"/>
         | 
| 1660 1660 | 
             
                    </p>
         | 
| 1661 1661 | 
             
                    </clause>
         | 
| 1662 1662 | 
             
                    </sections><bibliography><references id="_" obligation="informative" normative="true">
         | 
| 1663 1663 | 
             
                    <title>Normative references</title>
         | 
| 1664 1664 | 
             
                          #{NORM_REF_BOILERPLATE}
         | 
| 1665 | 
            -
             | 
| 1666 | 
            -
             | 
| 1667 | 
            -
             | 
| 1668 | 
            -
             | 
| 1669 | 
            -
             | 
| 1670 | 
            -
             | 
| 1671 | 
            -
             | 
| 1672 | 
            -
             | 
| 1673 | 
            -
             | 
| 1674 | 
            -
             | 
| 1675 | 
            -
             | 
| 1676 | 
            -
             | 
| 1677 | 
            -
             | 
| 1678 | 
            -
             | 
| 1679 | 
            -
             | 
| 1680 | 
            -
             | 
| 1681 | 
            -
             | 
| 1682 | 
            -
             | 
| 1683 | 
            -
             | 
| 1684 | 
            -
             | 
| 1685 | 
            -
             | 
| 1686 | 
            -
             | 
| 1687 | 
            -
             | 
| 1688 | 
            -
             | 
| 1689 | 
            -
             | 
| 1690 | 
            -
             | 
| 1691 | 
            -
             | 
| 1692 | 
            -
             | 
| 1693 | 
            -
             | 
| 1694 | 
            -
             | 
| 1695 | 
            -
             | 
| 1696 | 
            -
             | 
| 1697 | 
            -
             | 
| 1698 | 
            -
             | 
| 1699 | 
            -
             | 
| 1700 | 
            -
             | 
| 1701 | 
            -
             | 
| 1702 | 
            -
             | 
| 1703 | 
            -
             | 
| 1704 | 
            -
             | 
| 1705 | 
            -
             | 
| 1706 | 
            -
             | 
| 1707 | 
            -
             | 
| 1708 | 
            -
             | 
| 1709 | 
            -
             | 
| 1710 | 
            -
             | 
| 1711 | 
            -
             | 
| 1712 | 
            -
             | 
| 1713 | 
            -
             | 
| 1714 | 
            -
             | 
| 1715 | 
            -
             | 
| 1716 | 
            -
             | 
| 1717 | 
            -
             | 
| 1718 | 
            -
             | 
| 1719 | 
            -
             | 
| 1720 | 
            -
             | 
| 1721 | 
            -
             | 
| 1722 | 
            -
             | 
| 1723 | 
            -
             | 
| 1724 | 
            -
             | 
| 1725 | 
            -
             | 
| 1726 | 
            -
             | 
| 1727 | 
            -
             | 
| 1728 | 
            -
             | 
| 1729 | 
            -
             | 
| 1730 | 
            -
             | 
| 1731 | 
            -
             | 
| 1732 | 
            -
             | 
| 1733 | 
            -
             | 
| 1734 | 
            -
             | 
| 1735 | 
            -
             | 
| 1736 | 
            -
             | 
| 1737 | 
            -
             | 
| 1738 | 
            -
             | 
| 1739 | 
            -
             | 
| 1740 | 
            -
             | 
| 1741 | 
            -
             | 
| 1742 | 
            -
             | 
| 1743 | 
            -
             | 
| 1744 | 
            -
             | 
| 1745 | 
            -
             | 
| 1746 | 
            -
             | 
| 1747 | 
            -
             | 
| 1748 | 
            -
             | 
| 1749 | 
            -
             | 
| 1750 | 
            -
             | 
| 1751 | 
            -
             | 
| 1752 | 
            -
             | 
| 1753 | 
            -
             | 
| 1754 | 
            -
             | 
| 1755 | 
            -
             | 
| 1756 | 
            -
             | 
| 1757 | 
            -
             | 
| 1758 | 
            -
             | 
| 1759 | 
            -
             | 
| 1760 | 
            -
             | 
| 1761 | 
            -
             | 
| 1762 | 
            -
             | 
| 1763 | 
            -
             | 
| 1764 | 
            -
             | 
| 1765 | 
            -
             | 
| 1766 | 
            -
             | 
| 1767 | 
            -
             | 
| 1768 | 
            -
             | 
| 1769 | 
            -
             | 
| 1770 | 
            -
             | 
| 1771 | 
            -
             | 
| 1772 | 
            -
             | 
| 1773 | 
            -
             | 
| 1774 | 
            -
                                 </series>
         | 
| 1775 | 
            -
                                 <series type='main'>
         | 
| 1776 | 
            -
                                   <title format='text/plain' language='en' script='Latn'>RFC</title>
         | 
| 1777 | 
            -
                                   <number>8341</number>
         | 
| 1778 | 
            -
                                 </series>
         | 
| 1779 | 
            -
                               </bibitem>
         | 
| 1665 | 
            +
                         <bibitem id='iso123' type='standard'>
         | 
| 1666 | 
            +
                           <fetched/>
         | 
| 1667 | 
            +
                           <title type='main' format='text/plain'>Network Configuration Access Control Model</title>
         | 
| 1668 | 
            +
                           <uri type='src'>https://www.rfc-editor.org/info/rfc8341</uri>
         | 
| 1669 | 
            +
                           <docidentifier type='IETF' primary='true'>RFC 8341</docidentifier>
         | 
| 1670 | 
            +
                           <docidentifier type='IETF' scope='anchor'>RFC8341</docidentifier>
         | 
| 1671 | 
            +
                           <docidentifier type='DOI'>10.17487/RFC8341</docidentifier>
         | 
| 1672 | 
            +
                           <docnumber>RFC8341</docnumber>
         | 
| 1673 | 
            +
                           <date type='published'>
         | 
| 1674 | 
            +
                             <on>2018-03</on>
         | 
| 1675 | 
            +
                           </date>
         | 
| 1676 | 
            +
                           <contributor>
         | 
| 1677 | 
            +
                             <role type='author'/>
         | 
| 1678 | 
            +
                             <person>
         | 
| 1679 | 
            +
                               <name>
         | 
| 1680 | 
            +
                                 <completename language='en' script='Latn'>A. Bierman</completename>
         | 
| 1681 | 
            +
                               </name>
         | 
| 1682 | 
            +
                             </person>
         | 
| 1683 | 
            +
                           </contributor>
         | 
| 1684 | 
            +
                           <contributor>
         | 
| 1685 | 
            +
                             <role type='author'/>
         | 
| 1686 | 
            +
                             <person>
         | 
| 1687 | 
            +
                               <name>
         | 
| 1688 | 
            +
                                 <completename language='en' script='Latn'>M. Bjorklund</completename>
         | 
| 1689 | 
            +
                               </name>
         | 
| 1690 | 
            +
                             </person>
         | 
| 1691 | 
            +
                           </contributor>
         | 
| 1692 | 
            +
                           <language>en</language>
         | 
| 1693 | 
            +
                           <script>Latn</script>
         | 
| 1694 | 
            +
                           <abstract format='text/html' language='en' script='Latn'>
         | 
| 1695 | 
            +
                             <p id='_'>
         | 
| 1696 | 
            +
                               The standardization of network configuration interfaces for use with
         | 
| 1697 | 
            +
                               the Network Configuration Protocol (NETCONF) or the RESTCONF
         | 
| 1698 | 
            +
                               protocol requires a structured and secure operating environment that
         | 
| 1699 | 
            +
                               promotes human usability and multi-vendor interoperability. There is
         | 
| 1700 | 
            +
                               a need for standard mechanisms to restrict NETCONF or RESTCONF
         | 
| 1701 | 
            +
                               protocol access for particular users to a preconfigured subset of
         | 
| 1702 | 
            +
                               all available NETCONF or RESTCONF protocol operations and content.
         | 
| 1703 | 
            +
                               This document defines such an access control model.
         | 
| 1704 | 
            +
                             </p>
         | 
| 1705 | 
            +
                             <p id='_'>This document obsoletes RFC 6536.</p>
         | 
| 1706 | 
            +
                           </abstract>
         | 
| 1707 | 
            +
                           <series>
         | 
| 1708 | 
            +
                             <title format='text/plain'>STD</title>
         | 
| 1709 | 
            +
                             <number>91</number>
         | 
| 1710 | 
            +
                           </series>
         | 
| 1711 | 
            +
                           <series>
         | 
| 1712 | 
            +
                             <title format='text/plain'>RFC</title>
         | 
| 1713 | 
            +
                             <number>8341</number>
         | 
| 1714 | 
            +
                           </series>
         | 
| 1715 | 
            +
                           <keyword>NETCONF RESTCONF</keyword>
         | 
| 1716 | 
            +
                           <keyword>YANG</keyword>
         | 
| 1717 | 
            +
                           <keyword>XML</keyword>
         | 
| 1718 | 
            +
                         </bibitem>
         | 
| 1719 | 
            +
                         <bibitem id='iso124' type='standard'>
         | 
| 1720 | 
            +
                           <fetched/>
         | 
| 1721 | 
            +
                           <title type='main' format='text/plain'>Network Configuration Access Control Model</title>
         | 
| 1722 | 
            +
                           <uri type='src'>https://www.rfc-editor.org/info/rfc8341</uri>
         | 
| 1723 | 
            +
                           <docidentifier type='IETF' primary='true'>RFC 8341</docidentifier>
         | 
| 1724 | 
            +
                           <docidentifier type='metanorma'>[1]</docidentifier>
         | 
| 1725 | 
            +
                           <docidentifier type='IETF' scope='anchor'>RFC8341</docidentifier>
         | 
| 1726 | 
            +
                           <docidentifier type='DOI'>10.17487/RFC8341</docidentifier>
         | 
| 1727 | 
            +
                           <docnumber>RFC8341</docnumber>
         | 
| 1728 | 
            +
                           <date type='published'>
         | 
| 1729 | 
            +
                             <on>2018-03</on>
         | 
| 1730 | 
            +
                           </date>
         | 
| 1731 | 
            +
                           <contributor>
         | 
| 1732 | 
            +
                             <role type='author'/>
         | 
| 1733 | 
            +
                             <person>
         | 
| 1734 | 
            +
                               <name>
         | 
| 1735 | 
            +
                                 <completename language='en' script='Latn'>A. Bierman</completename>
         | 
| 1736 | 
            +
                               </name>
         | 
| 1737 | 
            +
                             </person>
         | 
| 1738 | 
            +
                           </contributor>
         | 
| 1739 | 
            +
                           <contributor>
         | 
| 1740 | 
            +
                             <role type='author'/>
         | 
| 1741 | 
            +
                             <person>
         | 
| 1742 | 
            +
                               <name>
         | 
| 1743 | 
            +
                                 <completename language='en' script='Latn'>M. Bjorklund</completename>
         | 
| 1744 | 
            +
                               </name>
         | 
| 1745 | 
            +
                             </person>
         | 
| 1746 | 
            +
                           </contributor>
         | 
| 1747 | 
            +
                           <language>en</language>
         | 
| 1748 | 
            +
                           <script>Latn</script>
         | 
| 1749 | 
            +
                           <abstract format='text/html' language='en' script='Latn'>
         | 
| 1750 | 
            +
                             <p id='_'>
         | 
| 1751 | 
            +
                               The standardization of network configuration interfaces for use with
         | 
| 1752 | 
            +
                               the Network Configuration Protocol (NETCONF) or the RESTCONF
         | 
| 1753 | 
            +
                               protocol requires a structured and secure operating environment that
         | 
| 1754 | 
            +
                               promotes human usability and multi-vendor interoperability. There is
         | 
| 1755 | 
            +
                               a need for standard mechanisms to restrict NETCONF or RESTCONF
         | 
| 1756 | 
            +
                               protocol access for particular users to a preconfigured subset of
         | 
| 1757 | 
            +
                               all available NETCONF or RESTCONF protocol operations and content.
         | 
| 1758 | 
            +
                               This document defines such an access control model.
         | 
| 1759 | 
            +
                             </p>
         | 
| 1760 | 
            +
                             <p id='_'>This document obsoletes RFC 6536.</p>
         | 
| 1761 | 
            +
                           </abstract>
         | 
| 1762 | 
            +
                           <series>
         | 
| 1763 | 
            +
                             <title format='text/plain'>STD</title>
         | 
| 1764 | 
            +
                             <number>91</number>
         | 
| 1765 | 
            +
                           </series>
         | 
| 1766 | 
            +
                           <series>
         | 
| 1767 | 
            +
                             <title format='text/plain'>RFC</title>
         | 
| 1768 | 
            +
                             <number>8341</number>
         | 
| 1769 | 
            +
                           </series>
         | 
| 1770 | 
            +
                           <keyword>NETCONF RESTCONF</keyword>
         | 
| 1771 | 
            +
                           <keyword>YANG</keyword>
         | 
| 1772 | 
            +
                           <keyword>XML</keyword>
         | 
| 1773 | 
            +
                         </bibitem>
         | 
| 1780 1774 | 
             
                             </references>
         | 
| 1781 1775 | 
             
                           </bibliography>
         | 
| 1782 1776 | 
             
                         </standard-document>
         | 
| @@ -1906,7 +1900,7 @@ RSpec.describe Metanorma::Standoc do | |
| 1906 1900 | 
             
                            <from>#{Date.today.year}</from>
         | 
| 1907 1901 | 
             
                          </copyright>
         | 
| 1908 1902 | 
             
                          <ext>
         | 
| 1909 | 
            -
                          <doctype> | 
| 1903 | 
            +
                          <doctype>standard</doctype>
         | 
| 1910 1904 | 
             
                          </ext>
         | 
| 1911 1905 | 
             
                        </bibdata>
         | 
| 1912 1906 | 
             
                        <sections>
         | 
| @@ -2495,7 +2489,7 @@ RSpec.describe Metanorma::Standoc do | |
| 2495 2489 | 
             
                       <foreword id='_' obligation='informative'>
         | 
| 2496 2490 | 
             
                         <title>Foreword</title>
         | 
| 2497 2491 | 
             
                         <p id='_'>
         | 
| 2498 | 
            -
                           <eref type='inline' bibitemid='iso124' citeas='[& | 
| 2492 | 
            +
                           <eref type='inline' bibitemid='iso124' citeas='[<strong>A</strong>.<fn reference="1"><p>hello</p>
</fn>]'/>
         | 
| 2499 2493 | 
             
                         </p>
         | 
| 2500 2494 | 
             
                       </foreword>
         | 
| 2501 2495 | 
             
                     </preface>
         | 
| @@ -2,7 +2,7 @@ require "spec_helper" | |
| 2 2 |  | 
| 3 3 | 
             
            RSpec.describe Metanorma::Standoc do
         | 
| 4 4 | 
             
              it "processes basic tables" do
         | 
| 5 | 
            -
                 | 
| 5 | 
            +
                input = <<~INPUT
         | 
| 6 6 | 
             
                  #{ASCIIDOC_BLANK_HDR}
         | 
| 7 7 | 
             
                  .Table Name
         | 
| 8 8 | 
             
                  |===
         | 
| @@ -11,6 +11,7 @@ RSpec.describe Metanorma::Standoc do | |
| 11 11 | 
             
                  h|1 |2 |3
         | 
| 12 12 | 
             
                  |===
         | 
| 13 13 | 
             
                INPUT
         | 
| 14 | 
            +
                output = <<~OUTPUT
         | 
| 14 15 | 
             
                       #{BLANK_HDR}
         | 
| 15 16 | 
             
                  <sections>
         | 
| 16 17 | 
             
                    <table id="_">
         | 
| @@ -33,10 +34,12 @@ RSpec.describe Metanorma::Standoc do | |
| 33 34 | 
             
                  </sections>
         | 
| 34 35 | 
             
                  </standard-document>
         | 
| 35 36 | 
             
                OUTPUT
         | 
| 37 | 
            +
                expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
         | 
| 38 | 
            +
                  .to be_equivalent_to xmlpp(output)
         | 
| 36 39 | 
             
              end
         | 
| 37 40 |  | 
| 38 41 | 
             
              it "processes table widths" do
         | 
| 39 | 
            -
                 | 
| 42 | 
            +
                input = <<~INPUT
         | 
| 40 43 | 
             
                  #{ASCIIDOC_BLANK_HDR}
         | 
| 41 44 | 
             
                  [width=75%]
         | 
| 42 45 | 
             
                  |===
         | 
| @@ -57,6 +60,7 @@ RSpec.describe Metanorma::Standoc do | |
| 57 60 | 
             
                  |===
         | 
| 58 61 |  | 
| 59 62 | 
             
                INPUT
         | 
| 63 | 
            +
                output = <<~OUTPUT
         | 
| 60 64 | 
             
                              #{BLANK_HDR}
         | 
| 61 65 | 
             
                    <sections>
         | 
| 62 66 | 
             
                      <table id='_' width='75%'>
         | 
| @@ -93,10 +97,12 @@ RSpec.describe Metanorma::Standoc do | |
| 93 97 | 
             
                  </standard-document>
         | 
| 94 98 |  | 
| 95 99 | 
             
                OUTPUT
         | 
| 100 | 
            +
                expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
         | 
| 101 | 
            +
                  .to be_equivalent_to xmlpp(output)
         | 
| 96 102 | 
             
              end
         | 
| 97 103 |  | 
| 98 104 | 
             
              it "processes column widths in tables" do
         | 
| 99 | 
            -
                 | 
| 105 | 
            +
                input = <<~INPUT
         | 
| 100 106 | 
             
                  #{ASCIIDOC_BLANK_HDR}
         | 
| 101 107 | 
             
                  [cols=".<,.^,^.>"]
         | 
| 102 108 | 
             
                  |===
         | 
| @@ -120,6 +126,7 @@ RSpec.describe Metanorma::Standoc do | |
| 120 126 | 
             
                  |1 |2 |3
         | 
| 121 127 | 
             
                  |===
         | 
| 122 128 | 
             
                INPUT
         | 
| 129 | 
            +
                output = <<~OUTPUT
         | 
| 123 130 | 
             
                       #{BLANK_HDR}
         | 
| 124 131 | 
             
                       <sections>
         | 
| 125 132 | 
             
                      <table id='_'>
         | 
| @@ -178,10 +185,12 @@ RSpec.describe Metanorma::Standoc do | |
| 178 185 | 
             
                    </sections>
         | 
| 179 186 | 
             
                  </standard-document>
         | 
| 180 187 | 
             
                OUTPUT
         | 
| 188 | 
            +
                expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
         | 
| 189 | 
            +
                  .to be_equivalent_to xmlpp(output)
         | 
| 181 190 | 
             
              end
         | 
| 182 191 |  | 
| 183 192 | 
             
              it "inserts header rows in a table with a name and no header" do
         | 
| 184 | 
            -
                 | 
| 193 | 
            +
                input = <<~INPUT
         | 
| 185 194 | 
             
                  #{ASCIIDOC_BLANK_HDR}
         | 
| 186 195 | 
             
                  [headerrows=2]
         | 
| 187 196 | 
             
                  .Table Name
         | 
| @@ -191,6 +200,7 @@ RSpec.describe Metanorma::Standoc do | |
| 191 200 | 
             
                  h|1 |2 |3
         | 
| 192 201 | 
             
                  |===
         | 
| 193 202 | 
             
                INPUT
         | 
| 203 | 
            +
                output = <<~OUTPUT
         | 
| 194 204 | 
             
                  #{BLANK_HDR}
         | 
| 195 205 | 
             
                         <sections>
         | 
| 196 206 | 
             
                       <table id="_">
         | 
| @@ -217,10 +227,12 @@ RSpec.describe Metanorma::Standoc do | |
| 217 227 | 
             
                     </sections>
         | 
| 218 228 | 
             
                     </standard-document>
         | 
| 219 229 | 
             
                OUTPUT
         | 
| 230 | 
            +
                expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
         | 
| 231 | 
            +
                  .to be_equivalent_to xmlpp(output)
         | 
| 220 232 | 
             
              end
         | 
| 221 233 |  | 
| 222 234 | 
             
              it "inserts header rows in a table without a name and no header" do
         | 
| 223 | 
            -
                 | 
| 235 | 
            +
                input = <<~INPUT
         | 
| 224 236 | 
             
                  #{ASCIIDOC_BLANK_HDR}
         | 
| 225 237 | 
             
                  [headerrows=2]
         | 
| 226 238 | 
             
                  |===
         | 
| @@ -229,6 +241,7 @@ RSpec.describe Metanorma::Standoc do | |
| 229 241 | 
             
                  h|1 |2 |3
         | 
| 230 242 | 
             
                  |===
         | 
| 231 243 | 
             
                INPUT
         | 
| 244 | 
            +
                output = <<~OUTPUT
         | 
| 232 245 | 
             
                  #{BLANK_HDR}
         | 
| 233 246 | 
             
                         <sections>
         | 
| 234 247 | 
             
                       <table id="_"><thead><tr>
         | 
| @@ -253,10 +266,12 @@ RSpec.describe Metanorma::Standoc do | |
| 253 266 | 
             
                     </sections>
         | 
| 254 267 | 
             
                     </standard-document>
         | 
| 255 268 | 
             
                OUTPUT
         | 
| 269 | 
            +
                expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
         | 
| 270 | 
            +
                  .to be_equivalent_to xmlpp(output)
         | 
| 256 271 | 
             
              end
         | 
| 257 272 |  | 
| 258 273 | 
             
              it "processes complex tables" do
         | 
| 259 | 
            -
                 | 
| 274 | 
            +
                input = <<~INPUT
         | 
| 260 275 | 
             
                  #{ASCIIDOC_BLANK_HDR}
         | 
| 261 276 | 
             
                  [cols="<.^,^.<,^.>,^,^",options="header,footer",headerrows=2,alt="An extensive summary, and illustration, of tables",subsequence="A",options="unnumbered",summary="This is an extremely long, convoluted summary",width=70%,number="3",keep-with-next=true,keep-lines-together=true]
         | 
| 262 277 | 
             
                  .Maximum _permissible_ mass fraction of defects
         | 
| @@ -286,6 +301,7 @@ RSpec.describe Metanorma::Standoc do | |
| 286 301 | 
             
                  5+a| Live insects shall not be present. Dead insects shall be included in extraneous matter.
         | 
| 287 302 | 
             
                  |===
         | 
| 288 303 | 
             
                INPUT
         | 
| 304 | 
            +
                output = <<~OUTPUT
         | 
| 289 305 | 
             
                              #{BLANK_HDR}
         | 
| 290 306 | 
             
                         <sections>
         | 
| 291 307 | 
             
                           <table id="_" alt="An extensive summary, and illustration, of tables" unnumbered="true" subsequence="A" summary="This is an extremely long, convoluted summary" width="70%" number="3" keep-with-next="true" keep-lines-together="true">
         | 
| @@ -452,5 +468,7 @@ RSpec.describe Metanorma::Standoc do | |
| 452 468 | 
             
                         </sections>
         | 
| 453 469 | 
             
                         </standard-document>
         | 
| 454 470 | 
             
                OUTPUT
         | 
| 471 | 
            +
                expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
         | 
| 472 | 
            +
                  .to be_equivalent_to xmlpp(output)
         | 
| 455 473 | 
             
              end
         | 
| 456 474 | 
             
            end
         |