metanorma-iso 1.9.2 → 1.9.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor/iso/basicdoc.rng +21 -4
- data/lib/asciidoctor/iso/cleanup.rb +3 -4
- data/lib/asciidoctor/iso/front.rb +9 -1
- data/lib/asciidoctor/iso/front_id.rb +7 -2
- data/lib/asciidoctor/iso/isodoc.rng +241 -61
- data/lib/asciidoctor/iso/isostandard.rng +10 -23
- data/lib/asciidoctor/iso/reqt.rng +23 -2
- data/lib/asciidoctor/iso/section.rb +7 -1
- data/lib/asciidoctor/iso/validate_section.rb +18 -20
- data/lib/asciidoctor/iso/validate_style.rb +17 -9
- data/lib/isodoc/iso/html/isodoc.css +1 -2
- data/lib/isodoc/iso/html/isodoc.scss +1 -1
- data/lib/isodoc/iso/html/wordstyle.css +16 -4
- data/lib/isodoc/iso/html/wordstyle.scss +16 -4
- data/lib/isodoc/iso/index.rb +48 -24
- data/lib/isodoc/iso/iso.amendment.xsl +407 -123
- data/lib/isodoc/iso/iso.international-standard.xsl +407 -123
- data/lib/isodoc/iso/metadata.rb +28 -16
- data/lib/isodoc/iso/presentation_xml_convert.rb +30 -22
- data/lib/metanorma/iso/version.rb +1 -1
- data/metanorma-iso.gemspec +3 -1
- data/spec/asciidoctor/base_spec.rb +351 -177
- data/spec/asciidoctor/blank_spec.rb +38 -0
- data/spec/asciidoctor/blocks_spec.rb +39 -0
- data/spec/asciidoctor/refs_spec.rb +1 -1
- data/spec/isodoc/inline_spec.rb +306 -245
- data/spec/isodoc/terms_spec.rb +30 -0
- data/spec/spec_helper.rb +12 -0
- data/spec/vcr_cassettes/docrels.yml +393 -0
- metadata +32 -2
data/spec/isodoc/terms_spec.rb
CHANGED
@@ -52,6 +52,14 @@ RSpec.describe IsoDoc do
|
|
52
52
|
<origin bibitemid="ISO7301" type="inline" citeas="ISO 7301:2011"><locality type="clause"><referenceFrom>3.1</referenceFrom></locality></origin>
|
53
53
|
</termsource>
|
54
54
|
</term>
|
55
|
+
<term id="A">
|
56
|
+
<preferred>term1</preferred>
|
57
|
+
<definition>term1 definition</definition>
|
58
|
+
<term id="B">
|
59
|
+
<preferred>term2</preferred>
|
60
|
+
<definition>term2 definition</definition>
|
61
|
+
</term>
|
62
|
+
</term>
|
55
63
|
</terms>
|
56
64
|
</sections>
|
57
65
|
</iso-standard>
|
@@ -119,6 +127,16 @@ RSpec.describe IsoDoc do
|
|
119
127
|
<origin bibitemid='ISO7301' type='inline' citeas='ISO 7301:2011'><locality type='clause'><referenceFrom>3.1</referenceFrom></locality>ISO 7301:2011, 3.1</origin>
|
120
128
|
</termsource>
|
121
129
|
</term>
|
130
|
+
<term id='A'>
|
131
|
+
<name>1.3</name>
|
132
|
+
<preferred>term1</preferred>
|
133
|
+
<definition>term1 definition</definition>
|
134
|
+
<term id='B'>
|
135
|
+
<name>1.3.1</name>
|
136
|
+
<preferred>term2</preferred>
|
137
|
+
<definition>term2 definition</definition>
|
138
|
+
</term>
|
139
|
+
</term>
|
122
140
|
</terms>
|
123
141
|
</sections>
|
124
142
|
</iso-standard>
|
@@ -175,6 +193,12 @@ RSpec.describe IsoDoc do
|
|
175
193
|
</div>
|
176
194
|
<p>[TERMREF]<a href="#ISO7301">ISO 7301:2011, 3.1</a>
|
177
195
|
[/TERMREF]</p>
|
196
|
+
<p class='TermNum' id='A'>1.3</p>
|
197
|
+
<p class='Terms' style='text-align:left;'>term1</p>
|
198
|
+
term1 definition
|
199
|
+
<p class='TermNum' id='B'>1.3.1</p>
|
200
|
+
<p class='Terms' style='text-align:left;'>term2</p>
|
201
|
+
term2 definition
|
178
202
|
</div>
|
179
203
|
</div>
|
180
204
|
</body>
|
@@ -212,6 +236,12 @@ RSpec.describe IsoDoc do
|
|
212
236
|
<div id='_671a1994-4783-40d0-bc81-987d06ffb74f' class="Note"><p class="Note">Note 2 to entry: <ul><li>A</li></ul><p id="_19830f33-e46c-42cc-94ca-a5ef101132d5">The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p></p></div>
|
213
237
|
<p class="Source">[TERMREF]<a href="#ISO7301">ISO 7301:2011, 3.1</a>
|
214
238
|
[/TERMREF]</p>
|
239
|
+
<p class='TermNum' id='A'>1.3</p>
|
240
|
+
<p class='Terms' style='text-align:left;'>term1</p>
|
241
|
+
term1 definition
|
242
|
+
<p class='TermNum' id='B'>1.3.1</p>
|
243
|
+
<p class='Terms' style='text-align:left;'>term2</p>
|
244
|
+
term2 definition
|
215
245
|
</div>
|
216
246
|
OUTPUT
|
217
247
|
expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
|
data/spec/spec_helper.rb
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
require "vcr"
|
2
|
+
|
3
|
+
VCR.configure do |config|
|
4
|
+
config.cassette_library_dir = "spec/vcr_cassettes"
|
5
|
+
config.hook_into :webmock
|
6
|
+
config.default_cassette_options = {
|
7
|
+
clean_outdated_http_interactions: true,
|
8
|
+
re_record_interval: 1512000,
|
9
|
+
record: :once,
|
10
|
+
}
|
11
|
+
end
|
12
|
+
|
1
13
|
require "simplecov"
|
2
14
|
SimpleCov.start do
|
3
15
|
add_filter "/spec/"
|