metanorma-standoc 1.3.9 → 1.3.10
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/Gemfile.lock +11 -11
- data/lib/asciidoctor/standoc/basicdoc.rng +3 -0
- data/lib/asciidoctor/standoc/biblio.rng +10 -3
- data/lib/asciidoctor/standoc/blocks.rb +10 -9
- data/lib/asciidoctor/standoc/front.rb +36 -29
- data/lib/asciidoctor/standoc/inline.rb +15 -4
- data/lib/asciidoctor/standoc/macros.rb +15 -2
- data/lib/asciidoctor/standoc/ref.rb +1 -1
- data/lib/asciidoctor/standoc/reqt.rb +1 -1
- data/lib/asciidoctor/standoc/section.rb +1 -1
- data/lib/asciidoctor/standoc/utils.rb +2 -2
- data/lib/metanorma/standoc/version.rb +1 -1
- data/spec/asciidoctor-standoc/base_spec.rb +8 -0
- data/spec/asciidoctor-standoc/blocks_spec.rb +7 -2
- data/spec/asciidoctor-standoc/inline_spec.rb +32 -0
- data/spec/asciidoctor-standoc/macros_spec.rb +31 -0
- data/spec/asciidoctor-standoc/table_spec.rb +5 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea42d5a3c0c61e4678fd05f453afde82b15a4cf9b74044516d4f59a301cbae1c
|
4
|
+
data.tar.gz: af553b4a2a5484f38120a8f0af0cf2eb679678a7bd1d1b20ce434cae18a04515
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f17e2f2fcdab711f86147b7d448cca5a11dcfe4d17a6259289c38b2cbcd08d233d14fbfb9dc305e19a0bddc9d6d5d533236016c1b9c04901a039cec1462b2d75
|
7
|
+
data.tar.gz: b515736de4a7fe758c939d53dc94c9142d085f29571d94b130d775748cf48aa9355159aa24bf57688a05910a1d505fee9260be8f34eab7427f721bf56dfb336d
|
data/Gemfile.lock
CHANGED
@@ -64,7 +64,7 @@ GEM
|
|
64
64
|
iev (0.2.3)
|
65
65
|
nokogiri (>= 1.10.4)
|
66
66
|
image_size (2.0.2)
|
67
|
-
isodoc (1.0.
|
67
|
+
isodoc (1.0.10)
|
68
68
|
asciimath
|
69
69
|
html2doc (~> 0.9.0)
|
70
70
|
htmlentities (~> 4.3.4)
|
@@ -77,9 +77,9 @@ GEM
|
|
77
77
|
thread_safe
|
78
78
|
uuidtools
|
79
79
|
isoics (0.1.8)
|
80
|
-
json (2.
|
80
|
+
json (2.3.0)
|
81
81
|
liquid (4.0.3)
|
82
|
-
listen (3.2.
|
82
|
+
listen (3.2.1)
|
83
83
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
84
84
|
rb-inotify (~> 0.9, >= 0.9.10)
|
85
85
|
lumberjack (1.0.13)
|
@@ -94,7 +94,7 @@ GEM
|
|
94
94
|
mini_portile2 (2.4.0)
|
95
95
|
multipart-post (2.1.1)
|
96
96
|
nenv (0.3.0)
|
97
|
-
nokogiri (1.10.
|
97
|
+
nokogiri (1.10.7)
|
98
98
|
mini_portile2 (~> 2.4.0)
|
99
99
|
notiffany (0.1.3)
|
100
100
|
nenv (~> 0.1)
|
@@ -113,7 +113,7 @@ GEM
|
|
113
113
|
rb-fsevent (0.10.3)
|
114
114
|
rb-inotify (0.10.0)
|
115
115
|
ffi (~> 1.0)
|
116
|
-
relaton (0.5.
|
116
|
+
relaton (0.5.19)
|
117
117
|
relaton-calconnect (~> 0.1.0)
|
118
118
|
relaton-gb (~> 0.6.0)
|
119
119
|
relaton-iec (~> 0.4.0)
|
@@ -125,30 +125,30 @@ GEM
|
|
125
125
|
relaton-bib (0.3.12)
|
126
126
|
addressable
|
127
127
|
nokogiri
|
128
|
-
relaton-calconnect (0.1.
|
128
|
+
relaton-calconnect (0.1.2)
|
129
129
|
faraday
|
130
130
|
relaton-iso-bib (~> 0.3.0)
|
131
|
-
relaton-gb (0.6.
|
131
|
+
relaton-gb (0.6.8)
|
132
132
|
cnccs (~> 0.1.1)
|
133
133
|
gb-agencies (~> 0.0.1)
|
134
134
|
relaton-iso-bib (~> 0.3.0)
|
135
|
-
relaton-iec (0.4.
|
135
|
+
relaton-iec (0.4.12)
|
136
136
|
addressable
|
137
137
|
relaton-iso-bib (~> 0.3.0)
|
138
138
|
relaton-ietf (0.6.10)
|
139
139
|
relaton-bib (~> 0.3.0)
|
140
140
|
relaton-iev (0.1.1)
|
141
141
|
relaton (~> 0.5.0)
|
142
|
-
relaton-iso (0.6.
|
142
|
+
relaton-iso (0.6.10)
|
143
143
|
relaton-iec (~> 0.4.0)
|
144
144
|
relaton-iso-bib (~> 0.3.0)
|
145
145
|
relaton-iso-bib (0.3.12)
|
146
146
|
isoics (~> 0.1.6)
|
147
147
|
relaton-bib (~> 0.3.0)
|
148
148
|
ruby_deep_clone (~> 0.8.0)
|
149
|
-
relaton-itu (0.3.
|
149
|
+
relaton-itu (0.3.11)
|
150
150
|
relaton-iso-bib (~> 0.3.0)
|
151
|
-
relaton-nist (0.3.
|
151
|
+
relaton-nist (0.3.9)
|
152
152
|
relaton-bib (~> 0.3.0)
|
153
153
|
rubyzip
|
154
154
|
relaton-ogc (0.1.4)
|
@@ -278,10 +278,12 @@
|
|
278
278
|
</define>
|
279
279
|
<define name="organization">
|
280
280
|
<element name="organization">
|
281
|
-
<
|
282
|
-
|
281
|
+
<oneOrMore>
|
282
|
+
<ref name="orgname"/>
|
283
|
+
</oneOrMore>
|
284
|
+
<zeroOrMore>
|
283
285
|
<ref name="subdivision"/>
|
284
|
-
</
|
286
|
+
</zeroOrMore>
|
285
287
|
<optional>
|
286
288
|
<ref name="abbreviation"/>
|
287
289
|
</optional>
|
@@ -357,6 +359,9 @@
|
|
357
359
|
</define>
|
358
360
|
<define name="phone">
|
359
361
|
<element name="phone">
|
362
|
+
<optional>
|
363
|
+
<attribute name="type"/>
|
364
|
+
</optional>
|
360
365
|
<text/>
|
361
366
|
</element>
|
362
367
|
</define>
|
@@ -1024,6 +1029,8 @@
|
|
1024
1029
|
<value>correctedBy</value>
|
1025
1030
|
<value>revises</value>
|
1026
1031
|
<value>revisedBy</value>
|
1032
|
+
<value>describes</value>
|
1033
|
+
<value>describedBy</value>
|
1027
1034
|
</choice>
|
1028
1035
|
</define>
|
1029
1036
|
<define name="docrelation">
|
@@ -41,7 +41,8 @@ module Asciidoctor
|
|
41
41
|
noko do |xml|
|
42
42
|
xml.figure **literal_attrs(node) do |f|
|
43
43
|
figure_title(node, f)
|
44
|
-
f.pre node.lines.join("\n"), **
|
44
|
+
f.pre node.lines.join("\n"), **attr_code(id: Utils::anchor_or_uuid,
|
45
|
+
alt: node.attr("alt"))
|
45
46
|
end
|
46
47
|
end
|
47
48
|
end
|
@@ -93,7 +94,7 @@ module Asciidoctor
|
|
93
94
|
xml.termnote **id_attr(n) do |ex|
|
94
95
|
wrap_in_para(n, ex)
|
95
96
|
end
|
96
|
-
end.join
|
97
|
+
end.join
|
97
98
|
end
|
98
99
|
|
99
100
|
def note(n)
|
@@ -101,7 +102,7 @@ module Asciidoctor
|
|
101
102
|
xml.note **id_attr(n) do |c|
|
102
103
|
wrap_in_para(n, c)
|
103
104
|
end
|
104
|
-
end.join
|
105
|
+
end.join
|
105
106
|
end
|
106
107
|
|
107
108
|
def admonition_attrs(node)
|
@@ -123,7 +124,7 @@ module Asciidoctor
|
|
123
124
|
node.title.nil? or a.name { |name| name << node.title }
|
124
125
|
wrap_in_para(node, a)
|
125
126
|
end
|
126
|
-
end.join
|
127
|
+
end.join
|
127
128
|
end
|
128
129
|
|
129
130
|
def term_example(node)
|
@@ -131,7 +132,7 @@ module Asciidoctor
|
|
131
132
|
xml.termexample **id_attr(node) do |ex|
|
132
133
|
wrap_in_para(node, ex)
|
133
134
|
end
|
134
|
-
end.join
|
135
|
+
end.join
|
135
136
|
end
|
136
137
|
|
137
138
|
def example(node)
|
@@ -150,7 +151,7 @@ module Asciidoctor
|
|
150
151
|
figure_title(node, ex)
|
151
152
|
wrap_in_para(node, ex)
|
152
153
|
end
|
153
|
-
end.join
|
154
|
+
end.join
|
154
155
|
end
|
155
156
|
|
156
157
|
def example_attrs(node)
|
@@ -163,7 +164,7 @@ module Asciidoctor
|
|
163
164
|
node.title.nil? or ex.name { |name| name << node.title }
|
164
165
|
wrap_in_para(node, ex)
|
165
166
|
end
|
166
|
-
end.join
|
167
|
+
end.join
|
167
168
|
end
|
168
169
|
|
169
170
|
def figure_title(node, f)
|
@@ -195,7 +196,7 @@ module Asciidoctor
|
|
195
196
|
xml.p **para_attrs(node) do |xml_t|
|
196
197
|
xml_t << node.content
|
197
198
|
end
|
198
|
-
end.join
|
199
|
+
end.join
|
199
200
|
end
|
200
201
|
|
201
202
|
def quote_attrs(node)
|
@@ -219,7 +220,7 @@ module Asciidoctor
|
|
219
220
|
quote_attribution(node, q)
|
220
221
|
wrap_in_para(node, q)
|
221
222
|
end
|
222
|
-
end
|
223
|
+
end.join
|
223
224
|
end
|
224
225
|
|
225
226
|
def listing_attrs(node)
|
@@ -42,8 +42,7 @@ module Asciidoctor
|
|
42
42
|
end
|
43
43
|
|
44
44
|
def metadata_author(node, xml)
|
45
|
-
|
46
|
-
publishers.split(/,[ ]?/).each do |p|
|
45
|
+
(node.attr("publisher") || "").split(/,[ ]?/).each do |p|
|
47
46
|
xml.contributor do |c|
|
48
47
|
c.role **{ type: "author" }
|
49
48
|
c.organization { |a| organization(a, p) }
|
@@ -53,9 +52,8 @@ module Asciidoctor
|
|
53
52
|
end
|
54
53
|
|
55
54
|
def personal_author(node, xml)
|
56
|
-
|
55
|
+
(node.attr("fullname") || node.attr("surname")) and
|
57
56
|
personal_author1(node, xml, "")
|
58
|
-
end
|
59
57
|
i = 2
|
60
58
|
while node.attr("fullname_#{i}") || node.attr("surname_#{i}")
|
61
59
|
personal_author1(node, xml, "_#{i}")
|
@@ -67,23 +65,11 @@ module Asciidoctor
|
|
67
65
|
xml.contributor do |c|
|
68
66
|
c.role **{ type: node.attr("role#{suffix}")&.downcase || "author" }
|
69
67
|
c.person do |p|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
n.initial node.attr("initials#{suffix}")
|
76
|
-
n.surname node.attr("surname#{suffix}")
|
77
|
-
end
|
78
|
-
end
|
79
|
-
node.attr("affiliation#{suffix}") and p.affiliation do |a|
|
80
|
-
a.organization do |o|
|
81
|
-
o.name node.attr("affiliation#{suffix}")
|
82
|
-
node.attr("address#{suffix}") and o.address do |ad|
|
83
|
-
ad.formattedAddress node.attr("address#{suffix}")
|
84
|
-
end
|
85
|
-
end
|
86
|
-
end
|
68
|
+
person_name(node, xml, suffix, p)
|
69
|
+
person_affiliation(node, xml, suffix, p)
|
70
|
+
node.attr("phone#{suffix}") and p.phone node.attr("phone#{suffix}")
|
71
|
+
node.attr("fax#{suffix}") and
|
72
|
+
p.phone node.attr("fax#{suffix}"), **{type: "fax"}
|
87
73
|
node.attr("email#{suffix}") and p.email node.attr("email#{suffix}")
|
88
74
|
node.attr("contributor-uri#{suffix}") and
|
89
75
|
p.uri node.attr("contributor-uri#{suffix}")
|
@@ -91,6 +77,29 @@ module Asciidoctor
|
|
91
77
|
end
|
92
78
|
end
|
93
79
|
|
80
|
+
def person_name(node, xml, suffix, p)
|
81
|
+
p.name do |n|
|
82
|
+
if node.attr("fullname#{suffix}")
|
83
|
+
n.completename node.attr("fullname#{suffix}")
|
84
|
+
else
|
85
|
+
n.forename node.attr("givenname#{suffix}")
|
86
|
+
n.initial node.attr("initials#{suffix}")
|
87
|
+
n.surname node.attr("surname#{suffix}")
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
def person_affiliation(node, xml, suffix, p)
|
93
|
+
node.attr("affiliation#{suffix}") and p.affiliation do |a|
|
94
|
+
a.organization do |o|
|
95
|
+
o.name node.attr("affiliation#{suffix}")
|
96
|
+
node.attr("address#{suffix}") and o.address do |ad|
|
97
|
+
ad.formattedAddress node.attr("address#{suffix}")
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
94
103
|
def metadata_publisher(node, xml)
|
95
104
|
publishers = node.attr("publisher") || return
|
96
105
|
publishers.split(/,[ ]?/).each do |p|
|
@@ -131,9 +140,7 @@ module Asciidoctor
|
|
131
140
|
def metadata_ics(node, xml)
|
132
141
|
ics = node.attr("library-ics")
|
133
142
|
ics && ics.split(/,\s*/).each do |i|
|
134
|
-
xml.ics
|
135
|
-
ics.code i
|
136
|
-
end
|
143
|
+
xml.ics { |ics| ics.code i }
|
137
144
|
end
|
138
145
|
end
|
139
146
|
|
@@ -231,14 +238,14 @@ module Asciidoctor
|
|
231
238
|
metadata_series(node, xml)
|
232
239
|
metadata_keywords(node, xml)
|
233
240
|
xml.ext do |ext|
|
234
|
-
|
241
|
+
metadata_ext(node, xml)
|
235
242
|
end
|
236
243
|
end
|
237
244
|
|
238
245
|
def metadata_ext(node, ext)
|
239
|
-
|
240
|
-
|
241
|
-
|
246
|
+
metadata_doctype(node, ext)
|
247
|
+
metadata_committee(node, ext)
|
248
|
+
metadata_ics(node, ext)
|
242
249
|
end
|
243
250
|
|
244
251
|
def metadata_doctype(node, xml)
|
@@ -261,7 +268,7 @@ module Asciidoctor
|
|
261
268
|
at = { language: lang, format: "text/plain" }
|
262
269
|
xml.title **attr_code(at) do |t|
|
263
270
|
t << Utils::asciidoc_sub(node.attr("title") || node.attr("title-en") ||
|
264
|
-
|
271
|
+
node.title)
|
265
272
|
end
|
266
273
|
end
|
267
274
|
end
|
@@ -78,22 +78,22 @@ module Asciidoctor
|
|
78
78
|
xml.fn **{ reference: @fn_number } do |fn|
|
79
79
|
fn.p { |p| p << node.text }
|
80
80
|
end
|
81
|
-
end.join
|
81
|
+
end.join
|
82
82
|
end
|
83
83
|
|
84
84
|
def inline_break(node)
|
85
85
|
noko do |xml|
|
86
86
|
xml << node.text
|
87
87
|
xml.br
|
88
|
-
end.join
|
88
|
+
end.join
|
89
89
|
end
|
90
90
|
|
91
91
|
def page_break(_node)
|
92
|
-
noko { |xml| xml.pagebreak }.join
|
92
|
+
noko { |xml| xml.pagebreak }.join
|
93
93
|
end
|
94
94
|
|
95
95
|
def thematic_break(_node)
|
96
|
-
noko { |xml| xml.hr }.join
|
96
|
+
noko { |xml| xml.hr }.join
|
97
97
|
end
|
98
98
|
|
99
99
|
def xml_encode(text)
|
@@ -184,6 +184,17 @@ module Asciidoctor
|
|
184
184
|
xml.image **(image_attributes(node))
|
185
185
|
end.join("")
|
186
186
|
end
|
187
|
+
|
188
|
+
def inline_indexterm(node)
|
189
|
+
noko do |xml|
|
190
|
+
node.type == :visible and xml << node.text
|
191
|
+
terms = node.attr("terms") ||
|
192
|
+
[Nokogiri::XML("<a>#{node.text}</a>").xpath("//text()").text]
|
193
|
+
xml.index nil, **attr_code(primary: terms[0],
|
194
|
+
secondary: terms.dig(1),
|
195
|
+
tertiary: terms.dig(2))
|
196
|
+
end.join
|
197
|
+
end
|
187
198
|
end
|
188
199
|
end
|
189
200
|
end
|
@@ -51,10 +51,23 @@ module Asciidoctor
|
|
51
51
|
prefix + suffix
|
52
52
|
end
|
53
53
|
|
54
|
+
def supply_br(lines)
|
55
|
+
lines.each_with_index do |l, i|
|
56
|
+
next if l.empty?
|
57
|
+
next if l.match(/ \+$/)
|
58
|
+
next if i == lines.size - 1
|
59
|
+
next if i < lines.size - 1 && lines[i+1].empty?
|
60
|
+
lines[i] += " +"
|
61
|
+
end
|
62
|
+
lines
|
63
|
+
end
|
64
|
+
|
54
65
|
def process parent, reader, attrs
|
55
66
|
attrs['role'] = 'pseudocode'
|
56
|
-
|
57
|
-
|
67
|
+
lines = reader.lines.map { |m| init_indent(m) }
|
68
|
+
create_block(parent, :example,
|
69
|
+
supply_br(lines),
|
70
|
+
attrs, content_model: :compound)
|
58
71
|
end
|
59
72
|
end
|
60
73
|
|
@@ -164,8 +164,8 @@ module Asciidoctor
|
|
164
164
|
doc = ::Nokogiri::XML.parse(NOKOHEAD)
|
165
165
|
fragment = doc.fragment("")
|
166
166
|
::Nokogiri::XML::Builder.with fragment, &block
|
167
|
-
fragment.to_xml(encoding: "US-ASCII").lines.map do |l|
|
168
|
-
l.gsub(/\s*\n$/m, " ").gsub("–", "\u0096").
|
167
|
+
fragment.to_xml(encoding: "US-ASCII", indent: 0).lines.map do |l|
|
168
|
+
l.gsub(/>\n$/, ">").gsub(/\s*\n$/m, " ").gsub("–", "\u0096").
|
169
169
|
gsub("—", "\u0097")
|
170
170
|
end
|
171
171
|
end
|
@@ -87,6 +87,8 @@ RSpec.describe Asciidoctor::Standoc do
|
|
87
87
|
:affiliation: Slate Rock and Gravel Company
|
88
88
|
:address: 6 Rubble Way, Bedrock
|
89
89
|
:contributor-uri: http://slate.example.com
|
90
|
+
:phone: 123
|
91
|
+
:fax: 456
|
90
92
|
:surname_2: Rubble
|
91
93
|
:givenname_2: Barney
|
92
94
|
:initials_2: B. X.
|
@@ -94,6 +96,8 @@ RSpec.describe Asciidoctor::Standoc do
|
|
94
96
|
:affiliation_2: Rockhead and Quarry Cave Construction Company
|
95
97
|
:address_2: 6A Rubble Way, Bedrock
|
96
98
|
:email_2: barney@rockhead.example.com
|
99
|
+
:phone_2: 789
|
100
|
+
:fax_2: 012
|
97
101
|
:publisher: Hanna Barbera, Cartoon Network
|
98
102
|
:part-of: ABC
|
99
103
|
:translated-from: DEF,GHI;JKL MNO,PQR
|
@@ -167,6 +171,8 @@ RSpec.describe Asciidoctor::Standoc do
|
|
167
171
|
</address>
|
168
172
|
</organization>
|
169
173
|
</affiliation>
|
174
|
+
<phone>123</phone>
|
175
|
+
<phone type='fax'>456</phone>
|
170
176
|
<uri>http://slate.example.com</uri>
|
171
177
|
</person>
|
172
178
|
</contributor>
|
@@ -186,6 +192,8 @@ RSpec.describe Asciidoctor::Standoc do
|
|
186
192
|
</address>
|
187
193
|
</organization>
|
188
194
|
</affiliation>
|
195
|
+
<phone>789</phone>
|
196
|
+
<phone type='fax'>012</phone>
|
189
197
|
<email>barney@rockhead.example.com</email>
|
190
198
|
</person>
|
191
199
|
</contributor>
|
@@ -413,16 +413,21 @@ RSpec.describe Asciidoctor::Standoc do
|
|
413
413
|
end
|
414
414
|
|
415
415
|
it "processes literals" do
|
416
|
-
expect(
|
416
|
+
expect((strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to (<<~"OUTPUT")
|
417
417
|
#{ASCIIDOC_BLANK_HDR}
|
418
|
+
|
419
|
+
[alt=Literal]
|
418
420
|
....
|
419
421
|
<LITERAL>
|
422
|
+
FIGURATIVE
|
420
423
|
....
|
421
424
|
INPUT
|
422
425
|
#{BLANK_HDR}
|
423
426
|
<sections>
|
424
427
|
<figure id="_">
|
425
|
-
<pre id="_"><LITERAL>
|
428
|
+
<pre alt="Literal" id="_"><LITERAL>
|
429
|
+
FIGURATIVE
|
430
|
+
</pre>
|
426
431
|
</figure>
|
427
432
|
</sections>
|
428
433
|
</standard-document>
|
@@ -207,6 +207,10 @@ RSpec.describe Asciidoctor::Standoc do
|
|
207
207
|
Hello!footnote:[Footnote text]
|
208
208
|
|
209
209
|
== Title footnote:[Footnote text 2]
|
210
|
+
|
211
|
+
Hello.footnote:abc[This is a repeated footnote]
|
212
|
+
|
213
|
+
Repetition.footnote:abc[]
|
210
214
|
INPUT
|
211
215
|
#{BLANK_HDR}
|
212
216
|
<preface><foreword obligation="informative">
|
@@ -219,10 +223,38 @@ RSpec.describe Asciidoctor::Standoc do
|
|
219
223
|
<title>Title<fn reference="2">
|
220
224
|
<p id="_">Footnote text 2</p>
|
221
225
|
</fn></title>
|
226
|
+
<p id='_'>
|
227
|
+
Hello.
|
228
|
+
<fn reference='3'>
|
229
|
+
<p id='_'>This is a repeated footnote</p>
|
230
|
+
</fn>
|
231
|
+
</p>
|
232
|
+
<p id='_'>
|
233
|
+
Repetition.
|
234
|
+
<fn reference='3'>
|
235
|
+
<p id='_'>This is a repeated footnote</p>
|
236
|
+
</fn>
|
237
|
+
</p>
|
222
238
|
</clause></sections>
|
223
239
|
</standard-document>
|
224
240
|
OUTPUT
|
225
241
|
end
|
226
242
|
|
243
|
+
it "processes index terms" do
|
244
|
+
expect((strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to (<<~"OUTPUT")
|
245
|
+
#{ASCIIDOC_BLANK_HDR}
|
246
|
+
((See)) Index ((_term_)) and(((A, B, C))).
|
247
|
+
INPUT
|
248
|
+
#{BLANK_HDR}
|
249
|
+
<sections>
|
250
|
+
<p id='_'>
|
251
|
+
See
|
252
|
+
<index primary='See'/> Index <em>term</em> <index primary='term'/> and<index primary='A' secondary='B' tertiary='C'/>.
|
253
|
+
</p>
|
254
|
+
</sections>
|
255
|
+
</standard-document>
|
256
|
+
OUTPUT
|
257
|
+
end
|
258
|
+
|
227
259
|
|
228
260
|
end
|
@@ -67,6 +67,37 @@ RSpec.describe Asciidoctor::Standoc do
|
|
67
67
|
OUTPUT
|
68
68
|
end
|
69
69
|
|
70
|
+
it "supplies line breaks in pseudocode" do
|
71
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
72
|
+
#{ASCIIDOC_BLANK_HDR}
|
73
|
+
|
74
|
+
[pseudocode]
|
75
|
+
====
|
76
|
+
A
|
77
|
+
B
|
78
|
+
|
79
|
+
D
|
80
|
+
E
|
81
|
+
====
|
82
|
+
INPUT
|
83
|
+
#{BLANK_HDR}
|
84
|
+
<sections>
|
85
|
+
<figure id='_' class='pseudocode'>
|
86
|
+
<p id='_'>
|
87
|
+
A
|
88
|
+
<br/>
|
89
|
+
B
|
90
|
+
</p>
|
91
|
+
<p id='_'>
|
92
|
+
D
|
93
|
+
<br/>
|
94
|
+
E
|
95
|
+
</p>
|
96
|
+
</figure>
|
97
|
+
</sections>
|
98
|
+
</standard-document>
|
99
|
+
OUTPUT
|
100
|
+
end
|
70
101
|
|
71
102
|
it "processes the Ruby markups" do
|
72
103
|
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
@@ -130,14 +130,14 @@ RSpec.describe Asciidoctor::Standoc do
|
|
130
130
|
| Husked rice, parboiled | 1,0 | 1,0 | Not applicable | 1,0
|
131
131
|
| Milled rice, parboiled | 1,0 | 1,0 | 1,0 | Not applicable
|
132
132
|
| Chips | 0,1 | 0,1 | 0,1 | 0,1
|
133
|
-
| HDK | 2,0
|
133
|
+
| HDK | 2,0 footnote:defectsmass[The maximum permissible mass fraction of defects shall be determined with respect to the mass fraction obtained after milling.] | 2,0 | 2,0 footnote:defectsmass[] | 2,0
|
134
134
|
| Damaged kernels | 4,0 | 3,0 | 4,0 | 3,0
|
135
135
|
| Immature and/or malformed kernels | 8,0 | 2,0 | 8,0 | 2,0
|
136
|
-
| Chalky kernels | 5,0
|
137
|
-
| Red kernels and red-streaked kernels | 12,0 | 12,0 | 12,0
|
138
|
-
| Partly gelatinized kernels | Not applicable | Not applicable | 11,0
|
136
|
+
| Chalky kernels | 5,0 footnote:defectsmass[] | 5,0 | Not applicable | Not applicable
|
137
|
+
| Red kernels and red-streaked kernels | 12,0 | 12,0 | 12,0 footnote:defectsmass[] | 12,0
|
138
|
+
| Partly gelatinized kernels | Not applicable | Not applicable | 11,0 footnote:defectsmass[] | 11,0
|
139
139
|
| Pecks | Not applicable | Not applicable | 4,0 | 2,0
|
140
|
-
| Waxy rice | 1,0
|
140
|
+
| Waxy rice | 1,0 footnote:defectsmass[] | 1,0 | 1,0 footnote:defectsmass[] | 1,0
|
141
141
|
|
142
142
|
5+a| Live insects shall not be present. Dead insects shall be included in extraneous matter.
|
143
143
|
|===
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-standoc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-12-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: asciidoctor
|