metanorma-iso 1.5.12 → 1.7.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 +18 -1
- data/lib/asciidoctor/iso/base.rb +5 -5
- data/lib/asciidoctor/iso/basicdoc.rng +52 -3
- data/lib/asciidoctor/iso/cleanup.rb +0 -6
- data/lib/asciidoctor/iso/front.rb +10 -5
- data/lib/asciidoctor/iso/isodoc.rng +51 -3
- data/lib/asciidoctor/iso/isostandard-amd.rng +8 -4
- data/lib/asciidoctor/iso/isostandard.rng +27 -10
- data/lib/asciidoctor/iso/validate.rb +78 -0
- data/lib/asciidoctor/iso/validate_section.rb +12 -9
- data/lib/isodoc/iso/base_convert.rb +2 -1
- data/lib/isodoc/iso/html/header.html +12 -12
- data/lib/isodoc/iso/html/html_iso_intro.html +1 -1
- data/lib/isodoc/iso/html/html_iso_titlepage.html +1 -1
- data/lib/isodoc/iso/html/htmlstyle.css +1 -1
- data/lib/isodoc/iso/html/htmlstyle.scss +1 -1
- data/lib/isodoc/iso/html/isodoc.css +42 -42
- data/lib/isodoc/iso/html/isodoc.scss +42 -42
- data/lib/isodoc/iso/html/style-human.css +9 -9
- data/lib/isodoc/iso/html/style-human.scss +7 -7
- data/lib/isodoc/iso/html/style-iso.css +7 -7
- data/lib/isodoc/iso/html/style-iso.scss +5 -5
- data/lib/isodoc/iso/html/word_iso_intro.html +1 -1
- data/lib/isodoc/iso/html/word_iso_titlepage.html +1 -1
- data/lib/isodoc/iso/html/wordstyle.css +67 -67
- data/lib/isodoc/iso/html/wordstyle.scss +67 -67
- data/lib/isodoc/iso/html_convert.rb +6 -2
- data/lib/isodoc/iso/i18n-en.yaml +2 -0
- data/lib/isodoc/iso/i18n-fr.yaml +1 -1
- data/lib/isodoc/iso/i18n-zh-Hans.yaml +1 -1
- data/lib/isodoc/iso/iso.amendment.xsl +276 -59
- data/lib/isodoc/iso/iso.international-standard.xsl +276 -59
- data/lib/isodoc/iso/metadata.rb +1 -0
- data/lib/isodoc/iso/sections.rb +1 -1
- data/lib/isodoc/iso/word_convert.rb +6 -2
- data/lib/isodoc/iso/xref.rb +34 -8
- data/lib/metanorma/iso/processor.rb +11 -9
- data/lib/metanorma/iso/version.rb +1 -1
- data/metanorma-iso.gemspec +2 -2
- data/spec/asciidoctor-iso/amd_spec.rb +14 -14
- data/spec/asciidoctor-iso/base_spec.rb +22 -20
- data/spec/asciidoctor-iso/blocks_spec.rb +22 -22
- data/spec/asciidoctor-iso/cleanup_spec.rb +32 -26
- data/spec/asciidoctor-iso/inline_spec.rb +7 -7
- data/spec/asciidoctor-iso/lists_spec.rb +9 -9
- data/spec/asciidoctor-iso/refs_spec.rb +5 -5
- data/spec/asciidoctor-iso/section_spec.rb +12 -7
- data/spec/asciidoctor-iso/table_spec.rb +4 -4
- data/spec/asciidoctor-iso/validate_spec.rb +455 -87
- data/spec/isodoc/amd_spec.rb +13 -13
- data/spec/isodoc/iso_spec.rb +2 -2
- data/spec/isodoc/metadata_spec.rb +2 -0
- data/spec/isodoc/section_spec.rb +20 -0
- data/spec/isodoc/xref_spec.rb +12 -0
- metadata +6 -12
- data/.github/workflows/macos.yml +0 -49
- data/.github/workflows/ubuntu.yml +0 -53
- data/.github/workflows/windows.yml +0 -50
- data/lib/asciidoctor/iso/macros.rb +0 -21
- data/lib/asciidoctor/iso/term_lookup_cleanup.rb +0 -86
- data/spec/asciidoctor-iso/macros_spec.rb +0 -310
@@ -2,7 +2,7 @@ require "spec_helper"
|
|
2
2
|
|
3
3
|
RSpec.describe Asciidoctor::ISO do
|
4
4
|
it "processes open blocks" do
|
5
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
5
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
6
6
|
#{ASCIIDOC_BLANK_HDR}
|
7
7
|
--
|
8
8
|
x
|
@@ -21,7 +21,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
21
21
|
end
|
22
22
|
|
23
23
|
it "processes stem blocks" do
|
24
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
24
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
25
25
|
#{ASCIIDOC_BLANK_HDR}
|
26
26
|
[stem]
|
27
27
|
++++
|
@@ -49,7 +49,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
49
49
|
end
|
50
50
|
|
51
51
|
it "ignores review blocks unless document is in draft mode" do
|
52
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
52
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
53
53
|
#{ASCIIDOC_BLANK_HDR}
|
54
54
|
[[foreword]]
|
55
55
|
.Foreword
|
@@ -70,7 +70,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
70
70
|
end
|
71
71
|
|
72
72
|
it "processes review blocks if document is in draft mode" do
|
73
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)).sub(/^.+<sections>/m, "<iso-standard><sections>"))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
73
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)).sub(/^.+<sections>/m, "<iso-standard><sections>"))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
74
74
|
= Document title
|
75
75
|
Author
|
76
76
|
:docfile: test.adoc
|
@@ -100,7 +100,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
100
100
|
end
|
101
101
|
|
102
102
|
it "processes term notes" do
|
103
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
103
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
104
104
|
#{ASCIIDOC_BLANK_HDR}
|
105
105
|
== Terms and Definitions
|
106
106
|
|
@@ -126,7 +126,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
126
126
|
end
|
127
127
|
|
128
128
|
it "processes notes" do
|
129
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
129
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
130
130
|
#{ASCIIDOC_BLANK_HDR}
|
131
131
|
NOTE: This is a note
|
132
132
|
INPUT
|
@@ -142,7 +142,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
142
142
|
end
|
143
143
|
|
144
144
|
it "processes literals" do
|
145
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
145
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
146
146
|
#{ASCIIDOC_BLANK_HDR}
|
147
147
|
....
|
148
148
|
LITERAL
|
@@ -159,7 +159,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
159
159
|
end
|
160
160
|
|
161
161
|
it "processes simple admonitions with Asciidoc names" do
|
162
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
162
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
163
163
|
#{ASCIIDOC_BLANK_HDR}
|
164
164
|
CAUTION: Only use paddy or parboiled rice for the determination of husked rice yield.
|
165
165
|
INPUT
|
@@ -176,7 +176,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
176
176
|
|
177
177
|
|
178
178
|
it "processes complex admonitions with non-Asciidoc names" do
|
179
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
179
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
180
180
|
#{ASCIIDOC_BLANK_HDR}
|
181
181
|
[CAUTION,type=Safety Precautions]
|
182
182
|
.Safety Precautions
|
@@ -191,7 +191,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
191
191
|
#{BLANK_HDR}
|
192
192
|
<sections>
|
193
193
|
<admonition id="_" type="safety precautions"><name>Safety Precautions</name><p id="_">While werewolves are hardy community members, keep in mind the following dietary concerns:</p>
|
194
|
-
<ol id="_"
|
194
|
+
<ol id="_">
|
195
195
|
<li>
|
196
196
|
<p id="_">They are allergic to cinnamon.</p>
|
197
197
|
</li>
|
@@ -209,7 +209,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
209
209
|
end
|
210
210
|
|
211
211
|
it "processes term examples" do
|
212
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
212
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
213
213
|
#{ASCIIDOC_BLANK_HDR}
|
214
214
|
== Terms and Definitions
|
215
215
|
|
@@ -237,7 +237,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
237
237
|
end
|
238
238
|
|
239
239
|
it "processes examples" do
|
240
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
240
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
241
241
|
#{ASCIIDOC_BLANK_HDR}
|
242
242
|
[example]
|
243
243
|
====
|
@@ -256,7 +256,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
256
256
|
end
|
257
257
|
|
258
258
|
it "processes preambles" do
|
259
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
259
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
260
260
|
#{ASCIIDOC_BLANK_HDR}
|
261
261
|
This is a preamble
|
262
262
|
|
@@ -275,7 +275,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
275
275
|
end
|
276
276
|
|
277
277
|
it "processes images" do
|
278
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
278
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
279
279
|
#{ASCIIDOC_BLANK_HDR}
|
280
280
|
.Split-it-right sample divider
|
281
281
|
image::spec/examples/rice_images/rice_image1.png[]
|
@@ -293,7 +293,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
293
293
|
end
|
294
294
|
|
295
295
|
it "accepts width and height attributes on images" do
|
296
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
296
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
297
297
|
#{ASCIIDOC_BLANK_HDR}
|
298
298
|
[height=4,width=3]
|
299
299
|
image::spec/examples/rice_images/rice_image1.png[]
|
@@ -310,7 +310,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
310
310
|
end
|
311
311
|
|
312
312
|
it "accepts auto for width and height attributes on images" do
|
313
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
313
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
314
314
|
#{ASCIIDOC_BLANK_HDR}
|
315
315
|
[height=4,width=auto]
|
316
316
|
image::spec/examples/rice_images/rice_image1.png[]
|
@@ -327,7 +327,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
327
327
|
end
|
328
328
|
|
329
329
|
it "accepts alignment attribute on paragraphs" do
|
330
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
330
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
331
331
|
#{ASCIIDOC_BLANK_HDR}
|
332
332
|
[align=right]
|
333
333
|
This para is right-aligned.
|
@@ -341,7 +341,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
341
341
|
end
|
342
342
|
|
343
343
|
it "processes blockquotes" do
|
344
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
344
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
345
345
|
#{ASCIIDOC_BLANK_HDR}
|
346
346
|
[quote, ISO, "ISO7301,section 1"]
|
347
347
|
____
|
@@ -365,7 +365,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
365
365
|
end
|
366
366
|
|
367
367
|
it "processes source code" do
|
368
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
368
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
369
369
|
#{ASCIIDOC_BLANK_HDR}
|
370
370
|
[source,ruby]
|
371
371
|
--
|
@@ -387,7 +387,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
387
387
|
end
|
388
388
|
|
389
389
|
it "processes callouts" do
|
390
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
390
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
391
391
|
#{ASCIIDOC_BLANK_HDR}
|
392
392
|
[source,ruby]
|
393
393
|
--
|
@@ -414,7 +414,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
414
414
|
end
|
415
415
|
|
416
416
|
it "processes unmodified term sources" do
|
417
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
417
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
418
418
|
#{ASCIIDOC_BLANK_HDR}
|
419
419
|
== Terms and Definitions
|
420
420
|
|
@@ -445,7 +445,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
445
445
|
end
|
446
446
|
|
447
447
|
it "processes modified term sources" do
|
448
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
448
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
449
449
|
#{ASCIIDOC_BLANK_HDR}
|
450
450
|
== Terms and Definitions
|
451
451
|
|
@@ -2,7 +2,7 @@ require "spec_helper"
|
|
2
2
|
|
3
3
|
RSpec.describe Asciidoctor::ISO do
|
4
4
|
it "removes empty text elements" do
|
5
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
5
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
6
6
|
#{ASCIIDOC_BLANK_HDR}
|
7
7
|
== {blank}
|
8
8
|
INPUT
|
@@ -17,7 +17,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
17
17
|
end
|
18
18
|
|
19
19
|
it "processes stem-only terms as admitted" do
|
20
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
20
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
21
21
|
#{ASCIIDOC_BLANK_HDR}
|
22
22
|
== Terms and Definitions
|
23
23
|
|
@@ -53,7 +53,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
53
53
|
end
|
54
54
|
|
55
55
|
it "moves term domains out of the term definition paragraph" do
|
56
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
56
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
57
57
|
#{ASCIIDOC_BLANK_HDR}
|
58
58
|
== Terms and Definitions
|
59
59
|
|
@@ -77,7 +77,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
77
77
|
end
|
78
78
|
|
79
79
|
it "permits multiple blocks in term definition paragraph" do
|
80
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
80
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
81
81
|
= Document title
|
82
82
|
Author
|
83
83
|
:docfile: test.adoc
|
@@ -124,8 +124,8 @@ RSpec.describe Asciidoctor::ISO do
|
|
124
124
|
OUTPUT
|
125
125
|
end
|
126
126
|
|
127
|
-
it "
|
128
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
127
|
+
it "keeps any initial boilerplate from terms and definitions" do
|
128
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
129
129
|
#{ASCIIDOC_BLANK_HDR}
|
130
130
|
== Terms and Definitions
|
131
131
|
|
@@ -142,6 +142,12 @@ RSpec.describe Asciidoctor::ISO do
|
|
142
142
|
<terms id="_" obligation="normative"><title>Terms and definitions</title>
|
143
143
|
|
144
144
|
#{TERM_BOILERPLATE}
|
145
|
+
<p id='_'>I am boilerplate</p>
|
146
|
+
<ul id='_'>
|
147
|
+
<li>
|
148
|
+
<p id='_'>So am I</p>
|
149
|
+
</li>
|
150
|
+
</ul>
|
145
151
|
<term id="term-time">
|
146
152
|
<preferred>Time</preferred>
|
147
153
|
<definition><p id="_">This paragraph is extraneous</p></definition>
|
@@ -152,7 +158,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
152
158
|
end
|
153
159
|
|
154
160
|
it "moves notes inside preceding blocks, if they are not at clause end, and the blocks are not delimited" do
|
155
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
161
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
156
162
|
#{ASCIIDOC_BLANK_HDR}
|
157
163
|
[stem]
|
158
164
|
++++
|
@@ -177,7 +183,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
177
183
|
end
|
178
184
|
|
179
185
|
it "does not move notes inside preceding blocks, if they are at clause end" do
|
180
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
186
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
181
187
|
#{ASCIIDOC_BLANK_HDR}
|
182
188
|
[source,ruby]
|
183
189
|
[1...x].each do |y|
|
@@ -198,7 +204,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
198
204
|
end
|
199
205
|
|
200
206
|
it "converts xrefs to references into erefs" do
|
201
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
207
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
202
208
|
#{ASCIIDOC_BLANK_HDR}
|
203
209
|
<<iso216>>
|
204
210
|
|
@@ -238,7 +244,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
238
244
|
end
|
239
245
|
|
240
246
|
it "extracts localities from erefs" do
|
241
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
247
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
242
248
|
#{ASCIIDOC_BLANK_HDR}
|
243
249
|
<<iso216,whole,clause=3,example=9-11,locality:prelude=33,locality:entirety:the reference>>
|
244
250
|
|
@@ -279,7 +285,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
279
285
|
|
280
286
|
|
281
287
|
it "strips type from xrefs" do
|
282
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
288
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
283
289
|
#{ASCIIDOC_BLANK_HDR}
|
284
290
|
<<iso216>>
|
285
291
|
|
@@ -315,7 +321,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
315
321
|
end
|
316
322
|
|
317
323
|
it "processes localities in term sources" do
|
318
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
324
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
319
325
|
#{ASCIIDOC_BLANK_HDR}
|
320
326
|
== Terms and Definitions
|
321
327
|
|
@@ -346,7 +352,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
346
352
|
end
|
347
353
|
|
348
354
|
it "removes extraneous material from Normative References" do
|
349
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
355
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
350
356
|
#{ASCIIDOC_BLANK_HDR}
|
351
357
|
[bibliography]
|
352
358
|
== Normative References
|
@@ -378,7 +384,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
378
384
|
end
|
379
385
|
|
380
386
|
it "inserts IDs into paragraphs" do
|
381
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
387
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
382
388
|
#{ASCIIDOC_BLANK_HDR}
|
383
389
|
Paragraph
|
384
390
|
INPUT
|
@@ -391,7 +397,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
391
397
|
end
|
392
398
|
|
393
399
|
it "inserts IDs into notes" do
|
394
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
400
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
395
401
|
#{ASCIIDOC_BLANK_HDR}
|
396
402
|
[example]
|
397
403
|
====
|
@@ -411,7 +417,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
411
417
|
end
|
412
418
|
|
413
419
|
it "moves table key inside table" do
|
414
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
420
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
415
421
|
#{ASCIIDOC_BLANK_HDR}
|
416
422
|
|===
|
417
423
|
|a |b |c
|
@@ -443,7 +449,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
443
449
|
end
|
444
450
|
|
445
451
|
it "processes headerrows attribute for table without header rows" do
|
446
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
452
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
447
453
|
#{ASCIIDOC_BLANK_HDR}
|
448
454
|
[headerrows=3]
|
449
455
|
|===
|
@@ -482,7 +488,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
482
488
|
end
|
483
489
|
|
484
490
|
it "processes headerrows attribute for table with header rows" do
|
485
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
491
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
486
492
|
#{ASCIIDOC_BLANK_HDR}
|
487
493
|
[headerrows=3]
|
488
494
|
|===
|
@@ -527,7 +533,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
527
533
|
end
|
528
534
|
|
529
535
|
it "moves table notes inside table" do
|
530
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
536
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
531
537
|
#{ASCIIDOC_BLANK_HDR}
|
532
538
|
|===
|
533
539
|
|a |b |c
|
@@ -558,7 +564,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
558
564
|
end
|
559
565
|
|
560
566
|
it "moves formula key inside formula" do
|
561
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
567
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
562
568
|
#{ASCIIDOC_BLANK_HDR}
|
563
569
|
[stem]
|
564
570
|
++++
|
@@ -585,7 +591,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
585
591
|
end
|
586
592
|
|
587
593
|
it "moves footnotes inside figures" do
|
588
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
594
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
589
595
|
#{ASCIIDOC_BLANK_HDR}
|
590
596
|
image::spec/examples/rice_images/rice_image1.png[]
|
591
597
|
|
@@ -609,7 +615,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
609
615
|
end
|
610
616
|
|
611
617
|
it "moves figure key inside figure" do
|
612
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
618
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
613
619
|
#{ASCIIDOC_BLANK_HDR}
|
614
620
|
image::spec/examples/rice_images/rice_image1.png[]
|
615
621
|
|
@@ -634,7 +640,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
634
640
|
end
|
635
641
|
|
636
642
|
it "numbers bibliographic notes and footnotes sequentially" do
|
637
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
643
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
638
644
|
#{ASCIIDOC_BLANK_HDR}
|
639
645
|
footnote:[Footnote]
|
640
646
|
|
@@ -687,7 +693,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
687
693
|
end
|
688
694
|
|
689
695
|
it "defaults section obligations" do
|
690
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
696
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
691
697
|
#{ASCIIDOC_BLANK_HDR}
|
692
698
|
|
693
699
|
== Clause
|
@@ -712,7 +718,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
712
718
|
end
|
713
719
|
|
714
720
|
it "extends clause levels past 5" do
|
715
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
721
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
716
722
|
#{ASCIIDOC_BLANK_HDR}
|
717
723
|
|
718
724
|
== Clause1
|
@@ -775,7 +781,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
775
781
|
end
|
776
782
|
|
777
783
|
it "reorders references in bibliography, and renumbers citations accordingly" do
|
778
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
784
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
779
785
|
#{ASCIIDOC_BLANK_HDR}
|
780
786
|
|
781
787
|
== Clause 1
|
@@ -2,7 +2,7 @@ require "spec_helper"
|
|
2
2
|
|
3
3
|
RSpec.describe Asciidoctor::ISO do
|
4
4
|
it "processes inline_quoted formatting" do
|
5
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
5
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
6
6
|
#{ASCIIDOC_BLANK_HDR}
|
7
7
|
_emphasis_
|
8
8
|
*strong*
|
@@ -47,7 +47,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
47
47
|
end
|
48
48
|
|
49
49
|
it "processes breaks" do
|
50
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
50
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
51
51
|
#{ASCIIDOC_BLANK_HDR}
|
52
52
|
Line break +
|
53
53
|
line break
|
@@ -66,7 +66,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
66
66
|
end
|
67
67
|
|
68
68
|
it "processes links" do
|
69
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
69
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
70
70
|
#{ASCIIDOC_BLANK_HDR}
|
71
71
|
mailto:fred@example.com
|
72
72
|
http://example.com[]
|
@@ -83,7 +83,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
83
83
|
end
|
84
84
|
|
85
85
|
it "processes bookmarks" do
|
86
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
86
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
87
87
|
#{ASCIIDOC_BLANK_HDR}
|
88
88
|
Text [[bookmark]] Text
|
89
89
|
INPUT
|
@@ -96,7 +96,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
96
96
|
end
|
97
97
|
|
98
98
|
it "processes crossreferences" do
|
99
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
99
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
100
100
|
#{ASCIIDOC_BLANK_HDR}
|
101
101
|
[[reference]]
|
102
102
|
== Section
|
@@ -121,7 +121,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
121
121
|
end
|
122
122
|
|
123
123
|
it "processes bibliographic anchors" do
|
124
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
124
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
125
125
|
#{ASCIIDOC_BLANK_HDR}
|
126
126
|
[bibliography]
|
127
127
|
== Normative References
|
@@ -152,7 +152,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
152
152
|
end
|
153
153
|
|
154
154
|
it "processes footnotes" do
|
155
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
155
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
156
156
|
#{ASCIIDOC_BLANK_HDR}
|
157
157
|
Hello!footnote:[Footnote text]
|
158
158
|
INPUT
|