isodoc 1.8.4 → 2.0.0
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/.github/workflows/rake.yml +3 -31
- data/lib/isodoc/function/references.rb +31 -22
- data/lib/isodoc/function/section_titles.rb +6 -1
- data/lib/isodoc/function/utils.rb +1 -0
- data/lib/isodoc/html_function/postprocess.rb +9 -2
- data/lib/isodoc/presentation_function/bibdata.rb +0 -6
- data/lib/isodoc/presentation_function/section.rb +27 -7
- data/lib/isodoc/version.rb +1 -1
- data/lib/isodoc/xref/xref_sect_gen.rb +7 -3
- data/spec/isodoc/blocks_spec.rb +2 -1
- data/spec/isodoc/postproc_spec.rb +28 -0
- data/spec/isodoc/presentation_xml_spec.rb +208 -37
- data/spec/isodoc/ref_spec.rb +332 -300
- data/spec/isodoc/section_spec.rb +70 -204
- metadata +2 -2
data/spec/isodoc/section_spec.rb
CHANGED
@@ -996,6 +996,7 @@ RSpec.describe IsoDoc do
|
|
996
996
|
<br/>
|
997
997
|
Variant 1
|
998
998
|
</h1>
|
999
|
+
<p style='display:none;' class='variant-title-sub'>Variant 1</p>
|
999
1000
|
<div id='Q'>
|
1000
1001
|
<h2>
|
1001
1002
|
A.1.  Annex A.1
|
@@ -1032,6 +1033,7 @@ RSpec.describe IsoDoc do
|
|
1032
1033
|
<br/>
|
1033
1034
|
<div>
|
1034
1035
|
<h1 class='Section3'>Bibliography</h1>
|
1036
|
+
<p style='display:none;' class='variant-title-sub'>Variant 1</p>
|
1035
1037
|
<div>
|
1036
1038
|
<h2 class='Section3'>
|
1037
1039
|
Bibliography Subsection
|
@@ -1274,6 +1276,7 @@ RSpec.describe IsoDoc do
|
|
1274
1276
|
<br/>
|
1275
1277
|
Variant 1
|
1276
1278
|
</h1>
|
1279
|
+
<p style='display:none;' class='variant-title-sub'>Variant 1</p>
|
1277
1280
|
<div id='Q'>
|
1278
1281
|
<h2>
|
1279
1282
|
A.1.
|
@@ -1320,6 +1323,7 @@ RSpec.describe IsoDoc do
|
|
1320
1323
|
</p>
|
1321
1324
|
<div>
|
1322
1325
|
<h1 class='Section3'>Bibliography</h1>
|
1326
|
+
<p style='display:none;' class='variant-title-sub'>Variant 1</p>
|
1323
1327
|
<div>
|
1324
1328
|
<h2 class='Section3'>
|
1325
1329
|
Bibliography Subsection
|
@@ -1498,142 +1502,58 @@ RSpec.describe IsoDoc do
|
|
1498
1502
|
<preface>
|
1499
1503
|
<introduction id="B" obligation="informative">
|
1500
1504
|
<title>Introduction</title>
|
1501
|
-
<
|
1505
|
+
<floating-title depth="1">A</p>
|
1502
1506
|
<clause id="B1" obligation="informative">
|
1503
1507
|
<title>Introduction Subsection</title>
|
1504
|
-
<
|
1508
|
+
<floating-title depth="2">B</p>
|
1505
1509
|
<clause id="B2" obligation="informative">
|
1506
1510
|
<title>Introduction Sub-subsection</title>
|
1507
|
-
<
|
1511
|
+
<floating-title depth="1">C</p>
|
1508
1512
|
</clause>
|
1509
1513
|
</clause>
|
1510
1514
|
</introduction>
|
1511
1515
|
</preface>
|
1512
|
-
<sections>
|
1513
|
-
<clause id="A" obligation="informative">
|
1514
|
-
<title>Introduction</title>
|
1515
|
-
<p type="floating-title">A</p>
|
1516
|
-
<clause id="A1" obligation="informative">
|
1517
|
-
<title>Introduction Subsection</title>
|
1518
|
-
<p type="floating-title">B</p>
|
1519
|
-
<clause id="A2" obligation="informative">
|
1520
|
-
<title>Introduction Sub-subsection</title>
|
1521
|
-
<p type="floating-title">C</p>
|
1522
|
-
</clause>
|
1523
|
-
</clause>
|
1524
|
-
</clause>
|
1525
|
-
</sections>
|
1526
|
-
<annex id="C" obligation="informative">
|
1527
|
-
<title>Introduction</title>
|
1528
|
-
<p type="floating-title">A</p>
|
1529
|
-
<clause id="C1" obligation="informative">
|
1530
|
-
<title>Introduction Subsection</title>
|
1531
|
-
<p type="floating-title">B</p>
|
1532
|
-
<clause id="C2" obligation="informative">
|
1533
|
-
<title>Introduction Sub-subsection</title>
|
1534
|
-
<p type="floating-title">C</p>
|
1535
|
-
</clause>
|
1536
|
-
</clause>
|
1537
|
-
</annex>
|
1538
1516
|
</iso-standard>
|
1539
1517
|
INPUT
|
1540
1518
|
|
1541
1519
|
presxml = <<~PRESXML
|
1542
|
-
|
1543
|
-
|
1544
|
-
|
1545
|
-
|
1546
|
-
|
1547
|
-
|
1548
|
-
|
1549
|
-
|
1550
|
-
|
1551
|
-
|
1552
|
-
|
1553
|
-
|
1554
|
-
|
1555
|
-
|
1556
|
-
|
1557
|
-
<sections>
|
1558
|
-
<clause id="A" obligation="informative" displayorder="2">
|
1559
|
-
<title depth="1">1.<tab/>Introduction</title>
|
1560
|
-
<p type="floating-title" depth="2">A</p>
|
1561
|
-
<clause id="A1" obligation="informative">
|
1562
|
-
<title depth="2">1.1.<tab/>Introduction Subsection</title>
|
1563
|
-
<p type="floating-title" depth="3">B</p>
|
1564
|
-
<clause id="A2" obligation="informative">
|
1565
|
-
<title depth="3">1.1.1.<tab/>Introduction Sub-subsection</title>
|
1566
|
-
<p type="floating-title" depth="4">C</p>
|
1567
|
-
</clause>
|
1568
|
-
</clause>
|
1569
|
-
</clause>
|
1570
|
-
</sections>
|
1571
|
-
<annex id="C" obligation="informative" displayorder="3">
|
1572
|
-
<title><strong>Annex A</strong><br/>(informative)<br/><br/><strong>Introduction</strong></title>
|
1573
|
-
<p type="floating-title" depth="2">A</p>
|
1574
|
-
<clause id="C1" obligation="informative">
|
1575
|
-
<title depth="2">A.1.<tab/>Introduction Subsection</title>
|
1576
|
-
<p type="floating-title" depth="3">B</p>
|
1577
|
-
<clause id="C2" obligation="informative">
|
1578
|
-
<title depth="3">A.1.1.<tab/>Introduction Sub-subsection</title>
|
1579
|
-
<p type="floating-title" depth="4">C</p>
|
1580
|
-
</clause>
|
1581
|
-
</clause>
|
1582
|
-
</annex>
|
1520
|
+
<iso-standard xmlns='http://riboseinc.com/isoxml' type='presentation'>
|
1521
|
+
<preface>
|
1522
|
+
<introduction id='B' obligation='informative' displayorder='1'>
|
1523
|
+
<title>Introduction</title>
|
1524
|
+
<p depth='1' type='floating-title'>A</p>
|
1525
|
+
<clause id='B1' obligation='informative'>
|
1526
|
+
<title depth='2'>Introduction Subsection</title>
|
1527
|
+
<p type='floating-title' depth="2">B</p>
|
1528
|
+
<clause id='B2' obligation='informative'>
|
1529
|
+
<title depth='3'>Introduction Sub-subsection</title>
|
1530
|
+
<p depth='1' type='floating-title'>C</p>
|
1531
|
+
</clause>
|
1532
|
+
</clause>
|
1533
|
+
</introduction>
|
1534
|
+
</preface>
|
1583
1535
|
</iso-standard>
|
1584
1536
|
PRESXML
|
1585
1537
|
|
1586
1538
|
html = <<~OUTPUT
|
1587
1539
|
#{HTML_HDR}
|
1588
|
-
|
1589
|
-
|
1590
|
-
|
1591
|
-
|
1592
|
-
|
1593
|
-
|
1594
|
-
|
1595
|
-
|
1596
|
-
|
1597
|
-
|
1598
|
-
|
1599
|
-
|
1600
|
-
|
1601
|
-
|
1602
|
-
|
1603
|
-
|
1604
|
-
|
1605
|
-
<div id='A1'>
|
1606
|
-
<h2>1.1.  Introduction Subsection</h2>
|
1607
|
-
<p class='h3'>B</p>
|
1608
|
-
<div id='A2'>
|
1609
|
-
<h3>1.1.1.  Introduction Sub-subsection</h3>
|
1610
|
-
<p class='h4'>C</p>
|
1611
|
-
</div>
|
1612
|
-
</div>
|
1613
|
-
</div>
|
1614
|
-
<br/>
|
1615
|
-
<div id='C' class='Section3'>
|
1616
|
-
<h1 class='Annex'>
|
1617
|
-
<b>Annex A</b>
|
1618
|
-
<br/>
|
1619
|
-
(informative)
|
1620
|
-
<br/>
|
1621
|
-
<br/>
|
1622
|
-
<b>Introduction</b>
|
1623
|
-
</h1>
|
1624
|
-
<p class='h2'>A</p>
|
1625
|
-
<div id='C1'>
|
1626
|
-
<h2>A.1.  Introduction Subsection</h2>
|
1627
|
-
<p class='h3'>B</p>
|
1628
|
-
<div id='C2'>
|
1629
|
-
<h3>A.1.1.  Introduction Sub-subsection</h3>
|
1630
|
-
<p class='h4'>C</p>
|
1631
|
-
</div>
|
1632
|
-
</div>
|
1633
|
-
</div>
|
1634
|
-
</div>
|
1635
|
-
</body>
|
1636
|
-
</html>
|
1540
|
+
<br/>
|
1541
|
+
<div class='Section3' id='B'>
|
1542
|
+
<h1 class='IntroTitle'>Introduction</h1>
|
1543
|
+
<p class='h1'>A</p>
|
1544
|
+
<div id='B1'>
|
1545
|
+
<h2>Introduction Subsection</h2>
|
1546
|
+
<p class='h2'>B</p>
|
1547
|
+
<div id='B2'>
|
1548
|
+
<h3>Introduction Sub-subsection</h3>
|
1549
|
+
<p class='h1'>C</p>
|
1550
|
+
</div>
|
1551
|
+
</div>
|
1552
|
+
</div>
|
1553
|
+
<p class='zzSTDTitle1'/>
|
1554
|
+
</div>
|
1555
|
+
</body>
|
1556
|
+
</html>
|
1637
1557
|
OUTPUT
|
1638
1558
|
|
1639
1559
|
word = <<~OUTPUT
|
@@ -1641,93 +1561,39 @@ RSpec.describe IsoDoc do
|
|
1641
1561
|
<head>
|
1642
1562
|
<style></style>
|
1643
1563
|
</head>
|
1644
|
-
|
1645
|
-
|
1646
|
-
|
1647
|
-
|
1648
|
-
|
1649
|
-
|
1650
|
-
|
1651
|
-
|
1652
|
-
|
1653
|
-
|
1654
|
-
|
1655
|
-
|
1656
|
-
|
1657
|
-
|
1658
|
-
|
1659
|
-
|
1660
|
-
|
1661
|
-
|
1662
|
-
|
1663
|
-
|
1664
|
-
</div>
|
1665
|
-
</div>
|
1666
|
-
</div>
|
1667
|
-
<p> </p>
|
1668
|
-
</div>
|
1669
|
-
<p>
|
1670
|
-
<br clear='all' class='section'/>
|
1671
|
-
</p>
|
1672
|
-
<div class='WordSection3'>
|
1673
|
-
<p class='zzSTDTitle1'/>
|
1674
|
-
<div id='A'>
|
1675
|
-
<h1>
|
1676
|
-
1.
|
1677
|
-
<span style='mso-tab-count:1'>  </span>
|
1678
|
-
Introduction
|
1679
|
-
</h1>
|
1680
|
-
<p>A</p>
|
1681
|
-
<div id='A1'>
|
1682
|
-
<h2>
|
1683
|
-
1.1.
|
1684
|
-
<span style='mso-tab-count:1'>  </span>
|
1685
|
-
Introduction Subsection
|
1686
|
-
</h2>
|
1687
|
-
<p>B</p>
|
1688
|
-
<div id='A2'>
|
1689
|
-
<h3>
|
1690
|
-
1.1.1.
|
1691
|
-
<span style='mso-tab-count:1'>  </span>
|
1692
|
-
Introduction Sub-subsection
|
1693
|
-
</h3>
|
1694
|
-
<p>C</p>
|
1695
|
-
</div>
|
1696
|
-
</div>
|
1697
|
-
</div>
|
1698
|
-
<p>
|
1699
|
-
<br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
|
1700
|
-
</p>
|
1701
|
-
<div id='C' class='Section3'>
|
1702
|
-
<h1 class='Annex'>
|
1703
|
-
<b>Annex A</b>
|
1704
|
-
<br/>
|
1705
|
-
(informative)
|
1706
|
-
<br/>
|
1707
|
-
<br/>
|
1708
|
-
<b>Introduction</b>
|
1709
|
-
</h1>
|
1710
|
-
<p>A</p>
|
1711
|
-
<div id='C1'>
|
1712
|
-
<h2>
|
1713
|
-
A.1.
|
1714
|
-
<span style='mso-tab-count:1'>  </span>
|
1715
|
-
Introduction Subsection
|
1716
|
-
</h2>
|
1717
|
-
<p>B</p>
|
1718
|
-
<div id='C2'>
|
1719
|
-
<h3>
|
1720
|
-
A.1.1.
|
1721
|
-
<span style='mso-tab-count:1'>  </span>
|
1722
|
-
Introduction Sub-subsection
|
1723
|
-
</h3>
|
1724
|
-
<p>C</p>
|
1725
|
-
</div>
|
1726
|
-
</div>
|
1564
|
+
<body lang='EN-US' link='blue' vlink='#954F72'>
|
1565
|
+
<div class='WordSection1'>
|
1566
|
+
<p> </p>
|
1567
|
+
</div>
|
1568
|
+
<p>
|
1569
|
+
<br clear='all' class='section'/>
|
1570
|
+
</p>
|
1571
|
+
<div class='WordSection2'>
|
1572
|
+
<p>
|
1573
|
+
<br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
|
1574
|
+
</p>
|
1575
|
+
<div class='Section3' id='B'>
|
1576
|
+
<h1 class='IntroTitle'>Introduction</h1>
|
1577
|
+
<p>A</p>
|
1578
|
+
<div id='B1'>
|
1579
|
+
<h2>Introduction Subsection</h2>
|
1580
|
+
<p>B</p>
|
1581
|
+
<div id='B2'>
|
1582
|
+
<h3>Introduction Sub-subsection</h3>
|
1583
|
+
<p>C</p>
|
1727
1584
|
</div>
|
1728
1585
|
</div>
|
1729
|
-
</
|
1730
|
-
|
1586
|
+
</div>
|
1587
|
+
<p> </p>
|
1588
|
+
</div>
|
1589
|
+
<p>
|
1590
|
+
<br clear='all' class='section'/>
|
1591
|
+
</p>
|
1592
|
+
<div class='WordSection3'>
|
1593
|
+
<p class='zzSTDTitle1'/>
|
1594
|
+
</div>
|
1595
|
+
</body>
|
1596
|
+
</html>
|
1731
1597
|
OUTPUT
|
1732
1598
|
expect(xmlpp(IsoDoc::PresentationXMLConvert.new({})
|
1733
1599
|
.convert("test", input, true))).to be_equivalent_to xmlpp(presxml)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: isodoc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: asciimath
|