metanorma-standoc 1.10.4.1 → 1.10.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/README.adoc +19 -23
  3. data/lib/asciidoctor/standoc/base.rb +11 -13
  4. data/lib/asciidoctor/standoc/basicdoc.rng +21 -4
  5. data/lib/asciidoctor/standoc/blocks.rb +27 -22
  6. data/lib/asciidoctor/standoc/blocks_notes.rb +17 -22
  7. data/lib/asciidoctor/standoc/cleanup.rb +38 -71
  8. data/lib/asciidoctor/standoc/cleanup_block.rb +5 -70
  9. data/lib/asciidoctor/standoc/cleanup_image.rb +6 -7
  10. data/lib/asciidoctor/standoc/cleanup_inline.rb +27 -98
  11. data/lib/asciidoctor/standoc/cleanup_maths.rb +113 -21
  12. data/lib/asciidoctor/standoc/cleanup_ref.rb +5 -0
  13. data/lib/asciidoctor/standoc/cleanup_reqt.rb +56 -18
  14. data/lib/asciidoctor/standoc/cleanup_section.rb +1 -0
  15. data/lib/asciidoctor/standoc/cleanup_section_names.rb +31 -14
  16. data/lib/asciidoctor/standoc/cleanup_table.rb +68 -0
  17. data/lib/asciidoctor/standoc/cleanup_terms.rb +1 -1
  18. data/lib/asciidoctor/standoc/cleanup_text.rb +73 -0
  19. data/lib/asciidoctor/standoc/cleanup_xref.rb +107 -0
  20. data/lib/asciidoctor/standoc/converter.rb +13 -0
  21. data/lib/asciidoctor/standoc/isodoc.rng +241 -61
  22. data/lib/asciidoctor/standoc/lists.rb +15 -15
  23. data/lib/asciidoctor/standoc/macros.rb +14 -43
  24. data/lib/asciidoctor/standoc/macros_note.rb +45 -0
  25. data/lib/asciidoctor/standoc/macros_terms.rb +33 -15
  26. data/lib/asciidoctor/standoc/reqt.rb +2 -2
  27. data/lib/asciidoctor/standoc/reqt.rng +23 -2
  28. data/lib/asciidoctor/standoc/table.rb +22 -20
  29. data/lib/asciidoctor/standoc/terms.rb +9 -1
  30. data/lib/asciidoctor/standoc/validate.rb +23 -14
  31. data/lib/asciidoctor/standoc/validate_section.rb +5 -2
  32. data/lib/metanorma/standoc/version.rb +1 -1
  33. data/metanorma-standoc.gemspec +1 -1
  34. data/spec/asciidoctor/base_spec.rb +0 -33
  35. data/spec/asciidoctor/blank_spec.rb +37 -0
  36. data/spec/asciidoctor/blocks_spec.rb +151 -30
  37. data/spec/asciidoctor/cleanup_blocks_spec.rb +1018 -0
  38. data/spec/asciidoctor/cleanup_sections_spec.rb +207 -0
  39. data/spec/asciidoctor/cleanup_spec.rb +193 -1078
  40. data/spec/asciidoctor/inline_spec.rb +36 -0
  41. data/spec/asciidoctor/isobib_cache_spec.rb +8 -8
  42. data/spec/asciidoctor/lists_spec.rb +6 -6
  43. data/spec/asciidoctor/macros_plantuml_spec.rb +1 -1
  44. data/spec/asciidoctor/macros_spec.rb +41 -26
  45. data/spec/asciidoctor/refs_dl_spec.rb +1 -1
  46. data/spec/asciidoctor/refs_spec.rb +220 -444
  47. data/spec/asciidoctor/section_spec.rb +1 -1
  48. data/spec/asciidoctor/validate_spec.rb +51 -0
  49. data/spec/assets/xref_error.adoc +1 -0
  50. data/spec/fixtures/datamodel_description_sections_tree.xml +24 -24
  51. data/spec/spec_helper.rb +5 -7
  52. data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec.yml +231 -143
  53. data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec1.yml +152 -0
  54. data/spec/vcr_cassettes/isobib_get_123.yml +52 -36
  55. data/spec/vcr_cassettes/isobib_get_123_1.yml +103 -71
  56. data/spec/vcr_cassettes/isobib_get_123_1_fr.yml +112 -80
  57. data/spec/vcr_cassettes/isobib_get_123_2001.yml +50 -34
  58. data/spec/vcr_cassettes/isobib_get_124.yml +51 -35
  59. data/spec/vcr_cassettes/rfcbib_get_rfc8341.yml +16 -16
  60. data/spec/vcr_cassettes/separates_iev_citations_by_top_level_clause.yml +70 -46
  61. metadata +11 -4
@@ -32,6 +32,18 @@
32
32
  <ref name="DocumentType"/>
33
33
  </element>
34
34
  </define>
35
+ <define name="section-title">
36
+ <element name="title">
37
+ <zeroOrMore>
38
+ <ref name="TextElement"/>
39
+ </zeroOrMore>
40
+ </element>
41
+ <zeroOrMore>
42
+ <element name="variant-title">
43
+ <ref name="TypedTitleString"/>
44
+ </element>
45
+ </zeroOrMore>
46
+ </define>
35
47
  <define name="hyperlink">
36
48
  <element name="link">
37
49
  <attribute name="target">
@@ -50,7 +62,9 @@
50
62
  <data type="boolean"/>
51
63
  </attribute>
52
64
  </optional>
53
- <text/>
65
+ <oneOrMore>
66
+ <ref name="PureTextElement"/>
67
+ </oneOrMore>
54
68
  </element>
55
69
  </define>
56
70
  <define name="xref">
@@ -88,7 +102,9 @@
88
102
  <data type="boolean"/>
89
103
  </attribute>
90
104
  </optional>
91
- <text/>
105
+ <oneOrMore>
106
+ <ref name="PureTextElement"/>
107
+ </oneOrMore>
92
108
  </element>
93
109
  </define>
94
110
  <define name="erefType">
@@ -118,7 +134,9 @@
118
134
  </attribute>
119
135
  </optional>
120
136
  <ref name="CitationType"/>
121
- <text/>
137
+ <oneOrMore>
138
+ <ref name="PureTextElement"/>
139
+ </oneOrMore>
122
140
  </define>
123
141
  <define name="ul">
124
142
  <element name="ul">
@@ -135,6 +153,14 @@
135
153
  <data type="boolean"/>
136
154
  </attribute>
137
155
  </optional>
156
+ <optional>
157
+ <attribute name="tag"/>
158
+ </optional>
159
+ <optional>
160
+ <attribute name="multilingual-rendering">
161
+ <ref name="MultilingualRenderingType"/>
162
+ </attribute>
163
+ </optional>
138
164
  <oneOrMore>
139
165
  <ref name="ul_li"/>
140
166
  </oneOrMore>
@@ -158,15 +184,25 @@
158
184
  <data type="boolean"/>
159
185
  </attribute>
160
186
  </optional>
161
- <attribute name="type">
162
- <choice>
163
- <value>roman</value>
164
- <value>alphabet</value>
165
- <value>arabic</value>
166
- <value>roman_upper</value>
167
- <value>alphabet_upper</value>
168
- </choice>
169
- </attribute>
187
+ <optional>
188
+ <attribute name="tag"/>
189
+ </optional>
190
+ <optional>
191
+ <attribute name="multilingual-rendering">
192
+ <ref name="MultilingualRenderingType"/>
193
+ </attribute>
194
+ </optional>
195
+ <optional>
196
+ <attribute name="type">
197
+ <choice>
198
+ <value>roman</value>
199
+ <value>alphabet</value>
200
+ <value>arabic</value>
201
+ <value>roman_upper</value>
202
+ <value>alphabet_upper</value>
203
+ </choice>
204
+ </attribute>
205
+ </optional>
170
206
  <oneOrMore>
171
207
  <ref name="li"/>
172
208
  </oneOrMore>
@@ -195,6 +231,14 @@
195
231
  <data type="boolean"/>
196
232
  </attribute>
197
233
  </optional>
234
+ <optional>
235
+ <attribute name="tag"/>
236
+ </optional>
237
+ <optional>
238
+ <attribute name="multilingual-rendering">
239
+ <ref name="MultilingualRenderingType"/>
240
+ </attribute>
241
+ </optional>
198
242
  <oneOrMore>
199
243
  <ref name="dt"/>
200
244
  <ref name="dd"/>
@@ -242,6 +286,14 @@
242
286
  <data type="boolean"/>
243
287
  </attribute>
244
288
  </optional>
289
+ <optional>
290
+ <attribute name="tag"/>
291
+ </optional>
292
+ <optional>
293
+ <attribute name="multilingual-rendering">
294
+ <ref name="MultilingualRenderingType"/>
295
+ </attribute>
296
+ </optional>
245
297
  <optional>
246
298
  <ref name="tname"/>
247
299
  </optional>
@@ -302,6 +354,14 @@
302
354
  <optional>
303
355
  <attribute name="width"/>
304
356
  </optional>
357
+ <optional>
358
+ <attribute name="tag"/>
359
+ </optional>
360
+ <optional>
361
+ <attribute name="multilingual-rendering">
362
+ <ref name="MultilingualRenderingType"/>
363
+ </attribute>
364
+ </optional>
305
365
  <optional>
306
366
  <ref name="colgroup"/>
307
367
  </optional>
@@ -352,6 +412,14 @@
352
412
  <optional>
353
413
  <attribute name="class"/>
354
414
  </optional>
415
+ <optional>
416
+ <attribute name="tag"/>
417
+ </optional>
418
+ <optional>
419
+ <attribute name="multilingual-rendering">
420
+ <ref name="MultilingualRenderingType"/>
421
+ </attribute>
422
+ </optional>
355
423
  <optional>
356
424
  <ref name="source"/>
357
425
  </optional>
@@ -410,6 +478,14 @@
410
478
  <optional>
411
479
  <attribute name="lang"/>
412
480
  </optional>
481
+ <optional>
482
+ <attribute name="tag"/>
483
+ </optional>
484
+ <optional>
485
+ <attribute name="multilingual-rendering">
486
+ <ref name="MultilingualRenderingType"/>
487
+ </attribute>
488
+ </optional>
413
489
  <optional>
414
490
  <ref name="tname"/>
415
491
  </optional>
@@ -458,6 +534,14 @@
458
534
  <data type="boolean"/>
459
535
  </attribute>
460
536
  </optional>
537
+ <optional>
538
+ <attribute name="tag"/>
539
+ </optional>
540
+ <optional>
541
+ <attribute name="multilingual-rendering">
542
+ <ref name="MultilingualRenderingType"/>
543
+ </attribute>
544
+ </optional>
461
545
  <ref name="stem"/>
462
546
  <optional>
463
547
  <ref name="dl"/>
@@ -486,6 +570,14 @@
486
570
  <data type="boolean"/>
487
571
  </attribute>
488
572
  </optional>
573
+ <optional>
574
+ <attribute name="tag"/>
575
+ </optional>
576
+ <optional>
577
+ <attribute name="multilingual-rendering">
578
+ <ref name="MultilingualRenderingType"/>
579
+ </attribute>
580
+ </optional>
489
581
  <zeroOrMore>
490
582
  <ref name="TextElement"/>
491
583
  </zeroOrMore>
@@ -513,6 +605,14 @@
513
605
  <data type="boolean"/>
514
606
  </attribute>
515
607
  </optional>
608
+ <optional>
609
+ <attribute name="tag"/>
610
+ </optional>
611
+ <optional>
612
+ <attribute name="multilingual-rendering">
613
+ <ref name="MultilingualRenderingType"/>
614
+ </attribute>
615
+ </optional>
516
616
  <zeroOrMore>
517
617
  <choice>
518
618
  <ref name="TextElement"/>
@@ -544,6 +644,14 @@
544
644
  <data type="boolean"/>
545
645
  </attribute>
546
646
  </optional>
647
+ <optional>
648
+ <attribute name="tag"/>
649
+ </optional>
650
+ <optional>
651
+ <attribute name="multilingual-rendering">
652
+ <ref name="MultilingualRenderingType"/>
653
+ </attribute>
654
+ </optional>
547
655
  <optional>
548
656
  <ref name="quote-source"/>
549
657
  </optional>
@@ -610,9 +718,6 @@
610
718
  <zeroOrMore>
611
719
  <ref name="BasicBlock"/>
612
720
  </zeroOrMore>
613
- <zeroOrMore>
614
- <ref name="note"/>
615
- </zeroOrMore>
616
721
  <zeroOrMore>
617
722
  <ref name="bibitem"/>
618
723
  <zeroOrMore>
@@ -653,6 +758,14 @@
653
758
  <optional>
654
759
  <attribute name="type"/>
655
760
  </optional>
761
+ <optional>
762
+ <attribute name="tag"/>
763
+ </optional>
764
+ <optional>
765
+ <attribute name="multilingual-rendering">
766
+ <ref name="MultilingualRenderingType"/>
767
+ </attribute>
768
+ </optional>
656
769
  <oneOrMore>
657
770
  <choice>
658
771
  <ref name="paragraph"/>
@@ -689,14 +802,9 @@
689
802
  <optional>
690
803
  <ref name="section-title"/>
691
804
  </optional>
692
- <group>
693
- <oneOrMore>
694
- <ref name="BasicBlock"/>
695
- </oneOrMore>
696
- <zeroOrMore>
697
- <ref name="note"/>
698
- </zeroOrMore>
699
- </group>
805
+ <oneOrMore>
806
+ <ref name="BasicBlock"/>
807
+ </oneOrMore>
700
808
  </define>
701
809
  <define name="li">
702
810
  <element name="li">
@@ -831,6 +939,9 @@
831
939
  <ref name="PureTextElement"/>
832
940
  <ref name="stem"/>
833
941
  <ref name="index"/>
942
+ <ref name="eref"/>
943
+ <ref name="xref"/>
944
+ <ref name="hyperlink"/>
834
945
  </choice>
835
946
  </zeroOrMore>
836
947
  </element>
@@ -842,6 +953,9 @@
842
953
  <ref name="PureTextElement"/>
843
954
  <ref name="stem"/>
844
955
  <ref name="index"/>
956
+ <ref name="eref"/>
957
+ <ref name="xref"/>
958
+ <ref name="hyperlink"/>
845
959
  </choice>
846
960
  </zeroOrMore>
847
961
  </element>
@@ -852,6 +966,9 @@
852
966
  <choice>
853
967
  <ref name="PureTextElement"/>
854
968
  <ref name="index"/>
969
+ <ref name="eref"/>
970
+ <ref name="xref"/>
971
+ <ref name="hyperlink"/>
855
972
  </choice>
856
973
  </zeroOrMore>
857
974
  </element>
@@ -910,6 +1027,14 @@
910
1027
  </define>
911
1028
  </include>
912
1029
  <!-- end overrides -->
1030
+ <define name="MultilingualRenderingType">
1031
+ <choice>
1032
+ <value>common</value>
1033
+ <value>all-columns</value>
1034
+ <value>parallel</value>
1035
+ <value>tag</value>
1036
+ </choice>
1037
+ </define>
913
1038
  <define name="docsubtype">
914
1039
  <element name="subdoctype">
915
1040
  <ref name="DocumentSubtype"/>
@@ -976,6 +1101,16 @@
976
1101
  <data type="boolean"/>
977
1102
  </attribute>
978
1103
  </optional>
1104
+ <optional>
1105
+ <attribute name="linkmention">
1106
+ <data type="boolean"/>
1107
+ </attribute>
1108
+ </optional>
1109
+ <optional>
1110
+ <attribute name="linkref">
1111
+ <data type="boolean"/>
1112
+ </attribute>
1113
+ </optional>
979
1114
  <optional>
980
1115
  <element name="refterm">
981
1116
  <zeroOrMore>
@@ -1012,6 +1147,7 @@
1012
1147
  <ref name="svgmap"/>
1013
1148
  <ref name="inputform"/>
1014
1149
  <ref name="toc"/>
1150
+ <ref name="passthrough"/>
1015
1151
  </choice>
1016
1152
  </define>
1017
1153
  <define name="toc">
@@ -1019,6 +1155,14 @@
1019
1155
  <ref name="ul"/>
1020
1156
  </element>
1021
1157
  </define>
1158
+ <define name="passthrough">
1159
+ <element name="passthrough">
1160
+ <optional>
1161
+ <attribute name="formats"/>
1162
+ </optional>
1163
+ <text/>
1164
+ </element>
1165
+ </define>
1022
1166
  <define name="inputform">
1023
1167
  <element name="form">
1024
1168
  <attribute name="id">
@@ -1029,6 +1173,14 @@
1029
1173
  <optional>
1030
1174
  <attribute name="class"/>
1031
1175
  </optional>
1176
+ <optional>
1177
+ <attribute name="tag"/>
1178
+ </optional>
1179
+ <optional>
1180
+ <attribute name="multilingual-rendering">
1181
+ <ref name="MultilingualRenderingType"/>
1182
+ </attribute>
1183
+ </optional>
1032
1184
  <zeroOrMore>
1033
1185
  <choice>
1034
1186
  <ref name="TextElement"/>
@@ -1228,9 +1380,6 @@
1228
1380
  <zeroOrMore>
1229
1381
  <ref name="BasicBlock"/>
1230
1382
  </zeroOrMore>
1231
- <zeroOrMore>
1232
- <ref name="note"/>
1233
- </zeroOrMore>
1234
1383
  <choice>
1235
1384
  <oneOrMore>
1236
1385
  <ref name="reference-clause"/>
@@ -1413,9 +1562,6 @@
1413
1562
  <zeroOrMore>
1414
1563
  <ref name="BasicBlock"/>
1415
1564
  </zeroOrMore>
1416
- <zeroOrMore>
1417
- <ref name="note"/>
1418
- </zeroOrMore>
1419
1565
  <ref name="dl"/>
1420
1566
  </oneOrMore>
1421
1567
  </element>
@@ -1475,14 +1621,9 @@
1475
1621
  <ref name="section-title"/>
1476
1622
  </optional>
1477
1623
  <group>
1478
- <group>
1479
- <zeroOrMore>
1480
- <ref name="BasicBlock"/>
1481
- </zeroOrMore>
1482
- <zeroOrMore>
1483
- <ref name="note"/>
1484
- </zeroOrMore>
1485
- </group>
1624
+ <zeroOrMore>
1625
+ <ref name="BasicBlock"/>
1626
+ </zeroOrMore>
1486
1627
  <zeroOrMore>
1487
1628
  <ref name="content-subsection"/>
1488
1629
  </zeroOrMore>
@@ -1529,14 +1670,9 @@
1529
1670
  </optional>
1530
1671
  <choice>
1531
1672
  <choice>
1532
- <group>
1533
- <oneOrMore>
1534
- <ref name="BasicBlock"/>
1535
- </oneOrMore>
1536
- <zeroOrMore>
1537
- <ref name="note"/>
1538
- </zeroOrMore>
1539
- </group>
1673
+ <oneOrMore>
1674
+ <ref name="BasicBlock"/>
1675
+ </oneOrMore>
1540
1676
  <ref name="amend"/>
1541
1677
  </choice>
1542
1678
  <oneOrMore>
@@ -1577,14 +1713,9 @@
1577
1713
  <ref name="section-title"/>
1578
1714
  </optional>
1579
1715
  <group>
1580
- <group>
1581
- <zeroOrMore>
1582
- <ref name="BasicBlock"/>
1583
- </zeroOrMore>
1584
- <zeroOrMore>
1585
- <ref name="note"/>
1586
- </zeroOrMore>
1587
- </group>
1716
+ <zeroOrMore>
1717
+ <ref name="BasicBlock"/>
1718
+ </zeroOrMore>
1588
1719
  <zeroOrMore>
1589
1720
  <choice>
1590
1721
  <ref name="annex-subsection"/>
@@ -1643,9 +1774,6 @@
1643
1774
  <zeroOrMore>
1644
1775
  <ref name="BasicBlock"/>
1645
1776
  </zeroOrMore>
1646
- <zeroOrMore>
1647
- <ref name="note"/>
1648
- </zeroOrMore>
1649
1777
  <choice>
1650
1778
  <oneOrMore>
1651
1779
  <ref name="term"/>
@@ -1686,7 +1814,9 @@
1686
1814
  <zeroOrMore>
1687
1815
  <ref name="termgrammar"/>
1688
1816
  </zeroOrMore>
1689
- <ref name="definition"/>
1817
+ <oneOrMore>
1818
+ <ref name="termdefinition"/>
1819
+ </oneOrMore>
1690
1820
  <zeroOrMore>
1691
1821
  <ref name="termnote"/>
1692
1822
  </zeroOrMore>
@@ -1749,7 +1879,7 @@
1749
1879
  </oneOrMore>
1750
1880
  </element>
1751
1881
  </define>
1752
- <define name="definition">
1882
+ <define name="termdefinition">
1753
1883
  <element name="definition">
1754
1884
  <oneOrMore>
1755
1885
  <choice>
@@ -1758,6 +1888,9 @@
1758
1888
  <ref name="formula"/>
1759
1889
  </choice>
1760
1890
  </oneOrMore>
1891
+ <zeroOrMore>
1892
+ <ref name="termsource"/>
1893
+ </zeroOrMore>
1761
1894
  </element>
1762
1895
  </define>
1763
1896
  <define name="termnote">
@@ -1786,6 +1919,14 @@
1786
1919
  <data type="boolean"/>
1787
1920
  </attribute>
1788
1921
  </optional>
1922
+ <optional>
1923
+ <attribute name="tag"/>
1924
+ </optional>
1925
+ <optional>
1926
+ <attribute name="multilingual-rendering">
1927
+ <ref name="MultilingualRenderingType"/>
1928
+ </attribute>
1929
+ </optional>
1789
1930
  <oneOrMore>
1790
1931
  <choice>
1791
1932
  <ref name="paragraph"/>
@@ -1802,6 +1943,24 @@
1802
1943
  <attribute name="id">
1803
1944
  <data type="ID"/>
1804
1945
  </attribute>
1946
+ <optional>
1947
+ <attribute name="keep-with-next">
1948
+ <data type="boolean"/>
1949
+ </attribute>
1950
+ </optional>
1951
+ <optional>
1952
+ <attribute name="keep-lines-together">
1953
+ <data type="boolean"/>
1954
+ </attribute>
1955
+ </optional>
1956
+ <optional>
1957
+ <attribute name="tag"/>
1958
+ </optional>
1959
+ <optional>
1960
+ <attribute name="multilingual-rendering">
1961
+ <ref name="MultilingualRenderingType"/>
1962
+ </attribute>
1963
+ </optional>
1805
1964
  <ref name="paragraph"/>
1806
1965
  </element>
1807
1966
  </define>
@@ -1928,9 +2087,6 @@
1928
2087
  <zeroOrMore>
1929
2088
  <ref name="BasicBlock"/>
1930
2089
  </zeroOrMore>
1931
- <zeroOrMore>
1932
- <ref name="note"/>
1933
- </zeroOrMore>
1934
2090
  <zeroOrMore>
1935
2091
  <choice>
1936
2092
  <ref name="term-clause"/>
@@ -1969,6 +2125,14 @@
1969
2125
  <optional>
1970
2126
  <attribute name="title"/>
1971
2127
  </optional>
2128
+ <optional>
2129
+ <attribute name="tag"/>
2130
+ </optional>
2131
+ <optional>
2132
+ <attribute name="multilingual-rendering">
2133
+ <ref name="MultilingualRenderingType"/>
2134
+ </attribute>
2135
+ </optional>
1972
2136
  <optional>
1973
2137
  <element name="location">
1974
2138
  <zeroOrMore>
@@ -2028,6 +2192,14 @@
2028
2192
  </define>
2029
2193
  <define name="imagemap">
2030
2194
  <element name="imagemap">
2195
+ <optional>
2196
+ <attribute name="tag"/>
2197
+ </optional>
2198
+ <optional>
2199
+ <attribute name="multilingual-rendering">
2200
+ <ref name="MultilingualRenderingType"/>
2201
+ </attribute>
2202
+ </optional>
2031
2203
  <ref name="figure"/>
2032
2204
  <zeroOrMore>
2033
2205
  <element name="area">
@@ -2072,6 +2244,14 @@
2072
2244
  </define>
2073
2245
  <define name="svgmap">
2074
2246
  <element name="svgmap">
2247
+ <optional>
2248
+ <attribute name="tag"/>
2249
+ </optional>
2250
+ <optional>
2251
+ <attribute name="multilingual-rendering">
2252
+ <ref name="MultilingualRenderingType"/>
2253
+ </attribute>
2254
+ </optional>
2075
2255
  <ref name="figure"/>
2076
2256
  <zeroOrMore>
2077
2257
  <element name="target">
@@ -4,10 +4,10 @@ module Asciidoctor
4
4
  def li(xml_ul, item)
5
5
  xml_ul.li do |xml_li|
6
6
  if item.blocks?
7
- xml_li.p(**id_attr(item)) { |t| t << item.text }
7
+ xml_li.p(**attr_code(id_attr(item))) { |t| t << item.text }
8
8
  xml_li << item.content
9
9
  else
10
- xml_li.p(**id_attr(item)) { |p| p << item.text }
10
+ xml_li.p(**attr_code(id_attr(item))) { |p| p << item.text }
11
11
  end
12
12
  end
13
13
  end
@@ -15,10 +15,10 @@ module Asciidoctor
15
15
  def ul_li(xml_ul, item)
16
16
  xml_ul.li **ul_li_attrs(item) do |xml_li|
17
17
  if item.blocks?
18
- xml_li.p(**id_attr(item)) { |t| t << item.text }
18
+ xml_li.p(**attr_code(id_attr(item))) { |t| t << item.text }
19
19
  xml_li << item.content
20
20
  else
21
- xml_li.p(**id_attr(item)) { |p| p << item.text }
21
+ xml_li.p(**attr_code(id_attr(item))) { |p| p << item.text }
22
22
  end
23
23
  end
24
24
  end
@@ -57,9 +57,8 @@ module Asciidoctor
57
57
  end
58
58
 
59
59
  def ol_attrs(node)
60
- attr_code(keep_attrs(node)
61
- .merge(id: Metanorma::Utils::anchor_or_uuid(node),
62
- type: olist_style(node.style)))
60
+ attr_code(id_attr(node).merge(keep_attrs(node)
61
+ .merge(type: olist_style(node.style))))
63
62
  end
64
63
 
65
64
  def olist(node)
@@ -79,22 +78,23 @@ module Asciidoctor
79
78
  end
80
79
  end
81
80
 
82
- def dd(dd, xml_dl)
83
- if dd.nil?
81
+ def dd(ddefn, xml_dl)
82
+ if ddefn.nil?
84
83
  xml_dl.dd
85
84
  return
86
85
  end
87
86
  xml_dl.dd do |xml_dd|
88
- xml_dd.p { |t| t << dd.text } if dd.text?
89
- xml_dd << dd.content if dd.blocks?
87
+ xml_dd.p { |t| t << ddefn.text } if ddefn.text?
88
+ xml_dd << ddefn.content if ddefn.blocks?
90
89
  end
91
90
  end
92
91
 
93
92
  def dl_attrs(node)
94
- attr_code(keep_attrs(node)
95
- .merge(id: Metanorma::Utils::anchor_or_uuid(node),
96
- metadata: node.option?("metadata") ? "true" : nil,
97
- key: node.option?("key") ? "true" : nil))
93
+ attr_code(id_attr(node).merge(keep_attrs(node)
94
+ .merge(
95
+ metadata: node.option?("metadata") ? "true" : nil,
96
+ key: node.option?("key") ? "true" : nil,
97
+ )))
98
98
  end
99
99
 
100
100
  def dlist(node)