metanorma-standoc 1.8.8 → 1.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.devel +0 -0
- data/lib/asciidoctor/standoc/base.rb +11 -1
- data/lib/asciidoctor/standoc/cleanup_boilerplate.rb +23 -14
- data/lib/asciidoctor/standoc/cleanup_section.rb +16 -15
- data/lib/asciidoctor/standoc/converter.rb +3 -1
- data/lib/asciidoctor/standoc/inline.rb +1 -1
- data/lib/asciidoctor/standoc/isodoc.rng +130 -1
- data/lib/asciidoctor/standoc/macros.rb +40 -13
- data/lib/asciidoctor/standoc/terms.rb +10 -6
- data/lib/metanorma/standoc/version.rb +5 -5
- data/metanorma-standoc.gemspec +9 -9
- data/spec/asciidoctor/base_spec.rb +14 -1
- data/spec/asciidoctor/blocks_spec.rb +10 -0
- data/spec/asciidoctor/cleanup_spec.rb +1864 -1877
- data/spec/asciidoctor/inline_spec.rb +272 -273
- data/spec/asciidoctor/macros_spec.rb +8 -2
- data/spec/asciidoctor/section_spec.rb +670 -687
- data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec.yml +58 -58
- data/spec/vcr_cassettes/isobib_get_123.yml +14 -14
- data/spec/vcr_cassettes/isobib_get_123_1.yml +27 -27
- data/spec/vcr_cassettes/isobib_get_123_1_fr.yml +40 -40
- data/spec/vcr_cassettes/isobib_get_123_2001.yml +15 -15
- data/spec/vcr_cassettes/isobib_get_124.yml +17 -17
- data/spec/vcr_cassettes/rfcbib_get_rfc8341.yml +14 -14
- data/spec/vcr_cassettes/separates_iev_citations_by_top_level_clause.yml +62 -60
- metadata +65 -64
@@ -1,38 +1,38 @@
|
|
1
1
|
require "spec_helper"
|
2
2
|
|
3
3
|
RSpec.describe Asciidoctor::Standoc do
|
4
|
-
|
4
|
+
it "handles spacing around markup" do
|
5
5
|
expect((strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to (<<~"OUTPUT")
|
6
6
|
#{ASCIIDOC_BLANK_HDR}
|
7
7
|
This is
|
8
8
|
a paragraph with <<x>>
|
9
9
|
markup _for_
|
10
10
|
text, including **__nest__**ed markup.
|
11
|
-
|
12
|
-
|
13
|
-
<standard-document xmlns="https://www.metanorma.org/ns/standoc" type="semantic" version="#{Metanorma::Standoc::VERSION}">
|
14
|
-
<bibdata type="standard">
|
15
|
-
<title language="en" format="text/plain">Document title</title>
|
16
|
-
<language>en</language>
|
17
|
-
<script>Latn</script>
|
18
|
-
<status>
|
19
|
-
<stage>published</stage>
|
20
|
-
</status>
|
21
|
-
<copyright>
|
22
|
-
<from>#{Date.today.year}</from>
|
23
|
-
</copyright>
|
24
|
-
<ext>
|
25
|
-
<doctype>article</doctype>
|
26
|
-
</ext>
|
27
|
-
</bibdata>
|
28
|
-
<sections>
|
29
|
-
<p id="_">This is
|
30
|
-
a paragraph with <xref target="x"/>
|
31
|
-
markup <em>for</em>
|
32
|
-
text, including <strong><em>nest</em></strong>ed markup.</p>
|
33
|
-
</sections>
|
34
|
-
</standard-document>
|
35
|
-
|
11
|
+
INPUT
|
12
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
13
|
+
<standard-document xmlns="https://www.metanorma.org/ns/standoc" type="semantic" version="#{Metanorma::Standoc::VERSION}">
|
14
|
+
<bibdata type="standard">
|
15
|
+
<title language="en" format="text/plain">Document title</title>
|
16
|
+
<language>en</language>
|
17
|
+
<script>Latn</script>
|
18
|
+
<status>
|
19
|
+
<stage>published</stage>
|
20
|
+
</status>
|
21
|
+
<copyright>
|
22
|
+
<from>#{Date.today.year}</from>
|
23
|
+
</copyright>
|
24
|
+
<ext>
|
25
|
+
<doctype>article</doctype>
|
26
|
+
</ext>
|
27
|
+
</bibdata>
|
28
|
+
<sections>
|
29
|
+
<p id="_">This is
|
30
|
+
a paragraph with <xref target="x"/>
|
31
|
+
markup <em>for</em>
|
32
|
+
text, including <strong><em>nest</em></strong>ed markup.</p>
|
33
|
+
</sections>
|
34
|
+
</standard-document>
|
35
|
+
OUTPUT
|
36
36
|
end
|
37
37
|
|
38
38
|
it "processes inline_quoted formatting" do
|
@@ -57,27 +57,27 @@ text, including <strong><em>nest</em></strong>ed markup.</p>
|
|
57
57
|
[smallcap]#smallcap#
|
58
58
|
[keyword]#keyword#
|
59
59
|
INPUT
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
60
|
+
#{BLANK_HDR}
|
61
|
+
<sections>
|
62
|
+
<em>Physical noise sources</em>
|
63
|
+
<strong>strong</strong>
|
64
|
+
<tt>monospace</tt>
|
65
|
+
"double quote"
|
66
|
+
'single quote'
|
67
|
+
super<sup>script</sup>
|
68
|
+
sub<sub>script</sub>
|
69
|
+
sub<sub><em>scr</em>ipt</sub>
|
70
|
+
<stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub> <mrow> <mrow> <mi mathvariant="bold-italic">F</mi> </mrow> </mrow> <mrow> <mrow> <mi mathvariant="bold-italic">Α</mi> </mrow> </mrow> </msub> </math></stem>
|
71
|
+
mark
|
72
|
+
<admitted>alt</admitted>
|
73
|
+
<deprecates>deprecated</deprecates>
|
74
|
+
<domain>domain</domain>
|
75
|
+
<strike>strike</strike>
|
76
|
+
<underline>underline</underline>
|
77
|
+
<smallcap>smallcap</smallcap>
|
78
|
+
<keyword>keyword</keyword>
|
79
|
+
</sections>
|
80
|
+
</standard-document>
|
81
81
|
OUTPUT
|
82
82
|
end
|
83
83
|
|
@@ -86,22 +86,22 @@ text, including <strong><em>nest</em></strong>ed markup.</p>
|
|
86
86
|
#{DUMBQUOTE_BLANK_HDR}
|
87
87
|
|
88
88
|
stem:[n < 1 " for all text "]
|
89
|
-
INPUT
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
</standard-document>
|
104
|
-
OUTPUT
|
89
|
+
INPUT
|
90
|
+
#{BLANK_HDR}
|
91
|
+
<sections>
|
92
|
+
<p id='_'>
|
93
|
+
<stem type='MathML'>
|
94
|
+
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
95
|
+
<mi>n</mi>
|
96
|
+
<mo/>
|
97
|
+
<mn>1</mn>
|
98
|
+
<mtext> for all text </mtext>
|
99
|
+
</math>
|
100
|
+
</stem>
|
101
|
+
</p>
|
102
|
+
</sections>
|
103
|
+
</standard-document>
|
104
|
+
OUTPUT
|
105
105
|
end
|
106
106
|
|
107
107
|
it "properly handles inline substitution" do
|
@@ -111,36 +111,36 @@ OUTPUT
|
|
111
111
|
stem:[n < 1] +
|
112
112
|
latexmath:[n < 1]
|
113
113
|
stem:["‌"^199 "Hg"^+]
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
</stem>
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
114
|
+
INPUT
|
115
|
+
#{BLANK_HDR}
|
116
|
+
<sections>
|
117
|
+
<p id="_">
|
118
|
+
<stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>n</mi><mo><</mo><mn>1</mn></math></stem><br/>
|
119
|
+
<stem type="MathML"> <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> <mi>n</mi> <mo><</mo> <mn>1</mn> </mrow> </math></stem>
|
120
|
+
<stem type='MathML'>
|
121
|
+
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
122
|
+
<msup>
|
123
|
+
<mrow>
|
124
|
+
<mtext></mtext>
|
125
|
+
</mrow>
|
126
|
+
<mrow>
|
127
|
+
<mn>199</mn>
|
128
|
+
</mrow>
|
129
|
+
</msup>
|
130
|
+
<msup>
|
131
|
+
<mrow>
|
132
|
+
<mtext>Hg</mtext>
|
133
|
+
</mrow>
|
134
|
+
<mrow>
|
135
|
+
<mo>+</mo>
|
136
|
+
</mrow>
|
137
|
+
</msup>
|
138
|
+
</math>
|
139
|
+
</stem>
|
140
|
+
</p>
|
141
|
+
</sections>
|
142
|
+
</standard-document>
|
143
|
+
OUTPUT
|
144
144
|
end
|
145
145
|
|
146
146
|
it "normalises inline stem, straight quotes" do
|
@@ -150,36 +150,36 @@ OUTPUT
|
|
150
150
|
stem:[n < 1]
|
151
151
|
latexmath:[n < 1]
|
152
152
|
stem:["‌"^199 "Hg"^+]
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
153
|
+
INPUT
|
154
|
+
#{BLANK_HDR}
|
155
|
+
<sections>
|
156
|
+
<p id="_">
|
157
|
+
<stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>n</mi><mo><</mo><mn>1</mn></math></stem>
|
158
|
+
<stem type="MathML"> <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> <mi>n</mi> <mo><</mo> <mn>1</mn> </mrow> </math></stem>
|
159
|
+
<stem type='MathML'>
|
160
|
+
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
161
|
+
<msup>
|
162
|
+
<mrow>
|
163
|
+
<mtext></mtext>
|
164
|
+
</mrow>
|
165
|
+
<mrow>
|
166
|
+
<mn>199</mn>
|
167
|
+
</mrow>
|
168
|
+
</msup>
|
169
|
+
<msup>
|
170
|
+
<mrow>
|
171
|
+
<mtext>Hg</mtext>
|
172
|
+
</mrow>
|
173
|
+
<mrow>
|
174
|
+
<mo>+</mo>
|
175
|
+
</mrow>
|
176
|
+
</msup>
|
177
|
+
</math>
|
178
|
+
</stem>
|
179
|
+
</p>
|
180
|
+
</sections>
|
181
|
+
</standard-document>
|
182
|
+
OUTPUT
|
183
183
|
end
|
184
184
|
|
185
185
|
it "normalises inline stem, smart quotes" do
|
@@ -189,53 +189,51 @@ OUTPUT
|
|
189
189
|
stem:[n < 1]
|
190
190
|
latexmath:[n < 1]
|
191
191
|
stem:["‌"^199 "Hg"^+]
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
192
|
+
INPUT
|
193
|
+
#{BLANK_HDR}
|
194
|
+
<sections>
|
195
|
+
<p id="_">
|
196
|
+
<stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>n</mi><mo><</mo><mn>1</mn></math></stem>
|
197
|
+
<stem type="MathML"> <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> <mi>n</mi> <mo><</mo> <mn>1</mn> </mrow> </math></stem>
|
198
|
+
<stem type='MathML'>
|
199
|
+
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
200
|
+
<msup>
|
201
|
+
<mrow>
|
202
|
+
<mtext></mtext>
|
203
|
+
</mrow>
|
204
|
+
<mrow>
|
205
|
+
<mn>199</mn>
|
206
|
+
</mrow>
|
207
|
+
</msup>
|
208
|
+
<msup>
|
209
|
+
<mrow>
|
210
|
+
<mtext>Hg</mtext>
|
211
|
+
</mrow>
|
212
|
+
<mrow>
|
213
|
+
<mo>+</mo>
|
214
|
+
</mrow>
|
215
|
+
</msup>
|
216
|
+
</math>
|
217
|
+
</stem>
|
218
|
+
</p>
|
219
|
+
</sections>
|
220
|
+
</standard-document>
|
221
|
+
OUTPUT
|
222
222
|
end
|
223
223
|
|
224
|
-
|
225
224
|
it "generates desired smart quotes for 'dd'" do
|
226
225
|
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
227
226
|
#{ASCIIDOC_BLANK_HDR}
|
228
227
|
'99'.
|
229
228
|
|
230
229
|
INPUT
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
230
|
+
#{BLANK_HDR}
|
231
|
+
<sections><p id="_">‘99’.</p>
|
232
|
+
</sections>
|
233
|
+
</standard-document>
|
235
234
|
OUTPUT
|
236
235
|
end
|
237
236
|
|
238
|
-
|
239
237
|
it "processes breaks" do
|
240
238
|
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
241
239
|
#{ASCIIDOC_BLANK_HDR}
|
@@ -252,15 +250,15 @@ OUTPUT
|
|
252
250
|
[%portrait]
|
253
251
|
<<<
|
254
252
|
INPUT
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
253
|
+
#{BLANK_HDR}
|
254
|
+
<sections><p id="_">Line break<br/>
|
255
|
+
line break</p>
|
256
|
+
<hr/>
|
257
|
+
<pagebreak/>
|
258
|
+
<pagebreak orientation="landscape"/>
|
259
|
+
<pagebreak orientation="portrait"/>
|
260
|
+
</sections>
|
261
|
+
</standard-document>
|
264
262
|
OUTPUT
|
265
263
|
end
|
266
264
|
|
@@ -273,34 +271,34 @@ OUTPUT
|
|
273
271
|
http://example.com[Link,title="tip"]
|
274
272
|
link:++https://asciidoctor.org/now_this__link_works.html++[]
|
275
273
|
INPUT
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
274
|
+
#{BLANK_HDR}
|
275
|
+
<sections>
|
276
|
+
<p id="_">mailto:fred@example.com
|
277
|
+
<link target="http://example.com"/>
|
278
|
+
<link target="http://example.com">Link</link>
|
279
|
+
<link target="http://example.com" alt="tip">Link</link>
|
280
|
+
<link target='https://asciidoctor.org/now_this__link_works.html'/>
|
281
|
+
</p>
|
282
|
+
</sections>
|
283
|
+
</standard-document>
|
286
284
|
OUTPUT
|
287
285
|
end
|
288
286
|
|
289
|
-
|
287
|
+
it "processes bookmarks" do
|
290
288
|
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
291
289
|
#{ASCIIDOC_BLANK_HDR}
|
292
290
|
Text [[bookmark]] Text
|
293
291
|
INPUT
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
292
|
+
#{BLANK_HDR}
|
293
|
+
<sections>
|
294
|
+
<p id="_">Text <bookmark id="bookmark"/> Text</p>
|
295
|
+
</sections>
|
296
|
+
</standard-document>
|
299
297
|
OUTPUT
|
300
|
-
|
298
|
+
end
|
301
299
|
|
302
|
-
|
303
|
-
|
300
|
+
it "processes crossreferences" do
|
301
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
304
302
|
#{ASCIIDOC_BLANK_HDR}
|
305
303
|
[[reference]]
|
306
304
|
== Section
|
@@ -318,39 +316,42 @@ OUTPUT
|
|
318
316
|
Lowercase Footnoted Reference to <<reference,droploc%fn>>
|
319
317
|
Capitalised Reference to <<reference,droploc%capital%>>
|
320
318
|
Lowercase Footnoted Reference to <<reference,droploc%capital%fn>>
|
319
|
+
Lowercase Footnoted Reference to <<reference,droploc%capital%text>>
|
321
320
|
INPUT
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
<xref target='reference' case='capital'/>
|
335
|
-
|
336
|
-
<xref target='reference' case='capital'/>
|
337
|
-
|
338
|
-
<xref target='reference' droploc='true'/>
|
339
|
-
|
340
|
-
<xref target='reference' droploc='true'/>
|
341
|
-
|
342
|
-
<xref target='reference' case='capital' droploc='true'/>
|
343
|
-
|
344
|
-
<xref target='reference' case='capital' droploc='true'/>
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
321
|
+
#{BLANK_HDR}
|
322
|
+
<sections>
|
323
|
+
<clause id="reference" inline-header="false" obligation="normative">
|
324
|
+
<title>Section</title>
|
325
|
+
<p id="_">Inline Reference to <xref target="reference"/>
|
326
|
+
Footnoted Reference to <xref target="reference"/>
|
327
|
+
Inline Reference with Text to <xref target="reference">text</xref>
|
328
|
+
Footnoted Reference with Text to <xref target="reference">text</xref>
|
329
|
+
Anchored Crossreference to other document <xref target="a#b"/>
|
330
|
+
Capitalised Reference to <xref target='reference' case='capital' droploc="true"></xref>
|
331
|
+
Lowercase Footnoted Reference to <xref target='reference' case='capital' droploc="true"></xref>
|
332
|
+
Capitalised Reference to
|
333
|
+
<xref target='reference' case='capital'/>
|
334
|
+
Lowercase Footnoted Reference to
|
335
|
+
<xref target='reference' case='capital'/>
|
336
|
+
Capitalised Reference to
|
337
|
+
<xref target='reference' droploc='true'/>
|
338
|
+
Lowercase Footnoted Reference to
|
339
|
+
<xref target='reference' droploc='true'/>
|
340
|
+
Capitalised Reference to
|
341
|
+
<xref target='reference' case='capital' droploc='true'/>
|
342
|
+
Lowercase Footnoted Reference to
|
343
|
+
<xref target='reference' case='capital' droploc='true'/>
|
344
|
+
Lowercase Footnoted Reference to
|
345
|
+
<xref target='reference' case='capital' droploc='true'>text</xref>
|
346
|
+
</p>
|
347
|
+
</clause>
|
348
|
+
</sections>
|
349
|
+
</standard-document>
|
350
|
+
OUTPUT
|
351
|
+
end
|
351
352
|
|
352
|
-
|
353
|
-
|
353
|
+
it "processes bibliographic anchors" do
|
354
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
354
355
|
#{ASCIIDOC_BLANK_HDR}
|
355
356
|
[bibliography]
|
356
357
|
== Normative References
|
@@ -359,29 +360,29 @@ OUTPUT
|
|
359
360
|
* [[[ISO713]]] Reference
|
360
361
|
|
361
362
|
INPUT
|
362
|
-
|
363
|
-
|
363
|
+
#{BLANK_HDR}
|
364
|
+
<sections>
|
364
365
|
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
366
|
+
</sections><bibliography><references id="_" obligation="informative" normative="true">
|
367
|
+
<title>Normative references</title>
|
368
|
+
<p id="_">The following documents are referred to in the text in such a way that some or all of their content constitutes requirements of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies.</p>
|
369
|
+
<bibitem id="ISO712">
|
370
|
+
<formattedref format="application/x-isodoc+xml">Reference</formattedref>
|
371
|
+
<docidentifier>x</docidentifier>
|
372
|
+
</bibitem>
|
373
|
+
<bibitem id="ISO713">
|
374
|
+
<formattedref format="application/x-isodoc+xml">Reference</formattedref>
|
375
|
+
<docidentifier>ISO713</docidentifier>
|
376
|
+
<docnumber>713</docnumber>
|
377
|
+
</bibitem>
|
378
|
+
</references>
|
379
|
+
</bibliography>
|
380
|
+
</standard-document>
|
380
381
|
OUTPUT
|
381
382
|
end
|
382
383
|
|
383
384
|
it "processes footnotes" do
|
384
|
-
|
385
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
385
386
|
#{ASCIIDOC_BLANK_HDR}
|
386
387
|
Hello!footnote:[Footnote text]
|
387
388
|
|
@@ -389,48 +390,46 @@ OUTPUT
|
|
389
390
|
|
390
391
|
Hello.footnote:abc[This is a repeated footnote]
|
391
392
|
|
392
|
-
Repetition.footnote:abc[]
|
393
|
+
Repetition.footnote:abc[]
|
393
394
|
INPUT
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
</p>
|
411
|
-
<p id='_'>
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
</p>
|
417
|
-
|
418
|
-
|
395
|
+
#{BLANK_HDR}
|
396
|
+
<preface><foreword id="_" obligation="informative">
|
397
|
+
<title>Foreword</title>
|
398
|
+
<p id="_">Hello!<fn reference="1">
|
399
|
+
<p id="_">Footnote text</p>
|
400
|
+
</fn></p>
|
401
|
+
</foreword></preface><sections>
|
402
|
+
<clause id="_" inline-header="false" obligation="normative">
|
403
|
+
<title>Title<fn reference="2">
|
404
|
+
<p id="_">Footnote text 2</p>
|
405
|
+
</fn></title>
|
406
|
+
<p id='_'>
|
407
|
+
Hello.
|
408
|
+
<fn reference='3'>
|
409
|
+
<p id='_'>This is a repeated footnote</p>
|
410
|
+
</fn>
|
411
|
+
</p>
|
412
|
+
<p id='_'>
|
413
|
+
Repetition.
|
414
|
+
<fn reference='3'>
|
415
|
+
<p id='_'>This is a repeated footnote</p>
|
416
|
+
</fn>
|
417
|
+
</p>
|
418
|
+
</clause></sections>
|
419
|
+
</standard-document>
|
419
420
|
OUTPUT
|
420
421
|
end
|
421
422
|
|
422
|
-
it "processes index terms" do
|
423
|
-
|
423
|
+
it "processes index terms" do
|
424
|
+
expect((strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to (<<~"OUTPUT")
|
424
425
|
#{ASCIIDOC_BLANK_HDR}
|
425
426
|
((See)) Index ((_term_)) and(((A~B~, stem:[alpha], Ⲁ))).
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
</standard-document>
|
432
|
-
|
427
|
+
INPUT
|
428
|
+
#{BLANK_HDR}
|
429
|
+
<sections>
|
430
|
+
<p id="_">See<index><primary>See</primary></index> Index <em>term</em><index><primary><em>term</em></primary></index> and<index><primary>A<sub>B</sub></primary><secondary><stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>α</mi></math></stem></secondary><tertiary>Ⲁ</tertiary></index>.</p>
|
431
|
+
</sections>
|
432
|
+
</standard-document>
|
433
|
+
OUTPUT
|
433
434
|
end
|
434
|
-
|
435
|
-
|
436
435
|
end
|