metanorma-iso 2.1.1 → 2.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/html2doc/lists.rb +142 -10
- data/lib/isodoc/iso/base_convert.rb +10 -0
- data/lib/isodoc/iso/html/html_iso_titlepage.html +2 -0
- data/lib/isodoc/iso/html/isodoc-dis.css +170 -252
- data/lib/isodoc/iso/html/isodoc-dis.scss +170 -245
- data/lib/isodoc/iso/html/isodoc.css +38 -13
- data/lib/isodoc/iso/html/isodoc.scss +38 -12
- data/lib/isodoc/iso/html/style-human.css +14 -1
- data/lib/isodoc/iso/html/style-human.scss +10 -1
- data/lib/isodoc/iso/html/style-iso.css +35 -23
- data/lib/isodoc/iso/html/style-iso.scss +31 -23
- data/lib/isodoc/iso/html/word_iso_intro-dis.html +1 -6
- data/lib/isodoc/iso/html/word_iso_titlepage-dis.html +24 -13
- data/lib/isodoc/iso/html/word_iso_titlepage-prf.html +58 -0
- data/lib/isodoc/iso/html/word_iso_titlepage.html +6 -2
- data/lib/isodoc/iso/html_convert.rb +5 -0
- data/lib/isodoc/iso/i18n-en.yaml +32 -4
- data/lib/isodoc/iso/i18n-fr.yaml +29 -3
- data/lib/isodoc/iso/i18n-ru.yaml +32 -4
- data/lib/isodoc/iso/i18n-zh-Hans.yaml +32 -3
- data/lib/isodoc/iso/i18n.rb +1 -1
- data/lib/isodoc/iso/iso.amendment.xsl +332 -187
- data/lib/isodoc/iso/iso.international-standard.xsl +332 -187
- data/lib/isodoc/iso/metadata.rb +63 -63
- data/lib/isodoc/iso/presentation_bibdata.rb +74 -0
- data/lib/isodoc/iso/presentation_xml_convert.rb +14 -3
- data/lib/isodoc/iso/presentation_xref.rb +8 -2
- data/lib/isodoc/iso/sections.rb +1 -1
- data/lib/isodoc/iso/word_cleanup.rb +3 -0
- data/lib/isodoc/iso/word_convert.rb +6 -3
- data/lib/isodoc/iso/word_dis_cleanup.rb +235 -0
- data/lib/isodoc/iso/word_dis_convert.rb +47 -108
- data/lib/isodoc/iso/xref.rb +34 -6
- data/lib/metanorma/iso/base.rb +20 -1
- data/lib/metanorma/iso/biblio.rng +32 -34
- data/lib/metanorma/iso/boilerplate-fr.xml +3 -0
- data/lib/metanorma/iso/boilerplate-ru.xml +3 -0
- data/lib/metanorma/iso/boilerplate.xml +3 -0
- data/lib/metanorma/iso/cleanup.rb +28 -1
- data/lib/metanorma/iso/front.rb +31 -6
- data/lib/metanorma/iso/front_id.rb +2 -0
- data/lib/metanorma/iso/isodoc.rng +9 -0
- data/lib/metanorma/iso/isostandard.rng +30 -12
- data/lib/metanorma/iso/macros.rb +29 -0
- data/lib/metanorma/iso/version.rb +1 -1
- data/spec/isodoc/amd_spec.rb +4 -30
- data/spec/isodoc/blocks_spec.rb +499 -2
- data/spec/isodoc/i18n_spec.rb +145 -80
- data/spec/isodoc/iso_spec.rb +50 -169
- data/spec/isodoc/metadata_spec.rb +224 -83
- data/spec/isodoc/postproc_spec.rb +41 -5
- data/spec/isodoc/section_spec.rb +12 -6
- data/spec/isodoc/word_dis_spec.rb +1273 -147
- data/spec/isodoc/xref_spec.rb +87 -13
- data/spec/metanorma/amd_spec.rb +53 -1
- data/spec/metanorma/base_spec.rb +185 -10
- data/spec/metanorma/blocks_spec.rb +54 -0
- data/spec/metanorma/lists_spec.rb +2 -2
- data/spec/metanorma/section_spec.rb +2 -2
- data/spec/spec_helper.rb +13 -4
- data/spec/vcr_cassettes/withdrawn_iso.yml +27 -27
- metadata +7 -8
- data/docs/asciiiso-syntax.adoc +0 -307
- data/docs/guidance.adoc +0 -487
- data/docs/navigation.adoc +0 -23
- data/docs/quickstart.adoc +0 -179
- data/lib/isodoc/iso/presentation_inline.rb +0 -90
@@ -455,8 +455,8 @@ RSpec.describe Metanorma::ISO do
|
|
455
455
|
|
456
456
|
INPUT
|
457
457
|
output = <<~OUTPUT
|
458
|
-
#{BLANK_HDR.sub(%r{<doctype>
|
459
|
-
'<doctype>
|
458
|
+
#{BLANK_HDR.sub(%r{<doctype>standard</doctype>},
|
459
|
+
'<doctype>standard</doctype><subdoctype>vocabulary</subdoctype>')}
|
460
460
|
<sections>
|
461
461
|
<terms id='_' obligation='normative'>
|
462
462
|
<title>Terms and Definitions</title>
|
data/spec/spec_helper.rb
CHANGED
@@ -47,7 +47,7 @@ RSpec.configure do |config|
|
|
47
47
|
end
|
48
48
|
|
49
49
|
def strip_guid(xml)
|
50
|
-
xml.gsub(%r{ id="_[^"]+"}, ' id="_"')
|
50
|
+
xml.gsub(%r{ id=['"]_[^"']+['"]}, ' id="_"')
|
51
51
|
.gsub(%r{ target="_[^"]+"}, ' target="_"')
|
52
52
|
.gsub(%r{ src="cid:[^.]+.gif"}, ' src="_.gif"')
|
53
53
|
.gsub(%r{ src='cid:[^.]+.gif'}, ' src="_.gif"')
|
@@ -151,7 +151,8 @@ BOILERPLATE =
|
|
151
151
|
File.read(ASCIIDOCTOR_ISO_DIR / "boilerplate.xml", encoding: "utf-8")
|
152
152
|
.gsub(/\{\{ agency \}\}/, "ISO")
|
153
153
|
.gsub(/\{\{ docyear \}\}/, Date.today.year.to_s)
|
154
|
-
.gsub(/\{% if unpublished %\}
|
154
|
+
.gsub(/\{% if unpublished %\}.*?\{% endif %\}/m, "")
|
155
|
+
.gsub(/\{% if stage_int >= 40 %\}(.*?)\{% endif %\}/m, "\\1")
|
155
156
|
.gsub(/(?<=\p{Alnum})'(?=\p{Alpha})/, "’"),
|
156
157
|
)
|
157
158
|
|
@@ -160,7 +161,8 @@ BOILERPLATE_FR =
|
|
160
161
|
File.read(ASCIIDOCTOR_ISO_DIR / "boilerplate-fr.xml", encoding: "utf-8")
|
161
162
|
.gsub(/\{\{ agency \}\}/, "ISO")
|
162
163
|
.gsub(/\{\{ docyear \}\}/, Date.today.year.to_s)
|
163
|
-
.gsub(/\{% if unpublished %\}
|
164
|
+
.gsub(/\{% if unpublished %\}.*?\{% endif %\}/m, "")
|
165
|
+
.gsub(/\{% if stage_int >= 40 %\}(.*?)\{% endif %\}/m, "\\1")
|
164
166
|
.gsub(/(?<=\p{Alnum})'(?=\p{Alpha})/, "’"),
|
165
167
|
)
|
166
168
|
|
@@ -198,12 +200,19 @@ BLANK_HDR1 = <<~"HDR".freeze
|
|
198
200
|
</owner>
|
199
201
|
</copyright>
|
200
202
|
<ext>
|
201
|
-
<doctype>
|
203
|
+
<doctype>standard</doctype>
|
202
204
|
<editorialgroup>
|
205
|
+
<agency>ISO</agency>
|
203
206
|
<technical-committee/>
|
204
207
|
<subcommittee/>
|
205
208
|
<workgroup/>
|
206
209
|
</editorialgroup>
|
210
|
+
<approvalgroup>
|
211
|
+
<agency>ISO</agency>
|
212
|
+
<technical-committee/>
|
213
|
+
<subcommittee/>
|
214
|
+
<workgroup/>
|
215
|
+
</approvalgroup>
|
207
216
|
<stagename>International standard</stagename>
|
208
217
|
</ext>
|
209
218
|
</bibdata>
|