metanorma-iso 2.1.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/iso/base_convert.rb +1 -1
- data/lib/isodoc/iso/html/isodoc-dis.css +108 -86
- data/lib/isodoc/iso/html/isodoc-dis.scss +186 -104
- data/lib/isodoc/iso/html/word_iso_titlepage-dis.html +2 -2
- data/lib/isodoc/iso/html/word_iso_titlepage.html +4 -4
- data/lib/isodoc/iso/html/wordstyle-dis.css +12 -62
- data/lib/isodoc/iso/html/wordstyle-dis.scss +7 -56
- data/lib/isodoc/iso/html_convert.rb +2 -2
- data/lib/isodoc/iso/iso.amendment.xsl +1046 -116
- data/lib/isodoc/iso/iso.international-standard.xsl +1046 -116
- data/lib/isodoc/iso/metadata.rb +8 -8
- data/lib/isodoc/iso/presentation_inline.rb +2 -2
- data/lib/isodoc/iso/presentation_xml_convert.rb +2 -2
- data/lib/isodoc/iso/presentation_xref.rb +2 -2
- data/lib/isodoc/iso/sections.rb +2 -2
- data/lib/isodoc/iso/word_convert.rb +2 -2
- data/lib/isodoc/iso/word_dis_convert.rb +12 -3
- data/lib/metanorma/iso/version.rb +1 -1
- data/spec/isodoc/amd_spec.rb +16 -16
- data/spec/isodoc/metadata_spec.rb +17 -17
- data/spec/isodoc/postproc_spec.rb +3 -3
- data/spec/spec_helper.rb +7 -0
- metadata +2 -2
data/lib/isodoc/iso/metadata.rb
CHANGED
@@ -94,25 +94,25 @@ module IsoDoc
|
|
94
94
|
suffix = @c.encode(part.text, :hexadecimal)
|
95
95
|
p = titlenums[:part]
|
96
96
|
titlenums[:part] && titlenums[:subpart] and
|
97
|
-
p = "#{titlenums[:part]}
|
97
|
+
p = "#{titlenums[:part]}–#{titlenums[:subpart]}"
|
98
98
|
titlenums[:part] and
|
99
|
-
suffix = "#{part_label(lang)}
|
99
|
+
suffix = "#{part_label(lang)} #{p}: " + suffix
|
100
100
|
suffix
|
101
101
|
end
|
102
102
|
|
103
103
|
def part_prefix(titlenums, lang)
|
104
104
|
p = titlenums[:part]
|
105
105
|
titlenums[:part] && titlenums[:subpart] and
|
106
|
-
p = "#{titlenums[:part]}
|
107
|
-
"#{part_label(lang)}
|
106
|
+
p = "#{titlenums[:part]}–#{titlenums[:subpart]}"
|
107
|
+
"#{part_label(lang)} #{p}"
|
108
108
|
end
|
109
109
|
|
110
110
|
def amd_prefix(titlenums, lang)
|
111
|
-
"#{amd_label(lang)}
|
111
|
+
"#{amd_label(lang)} #{titlenums[:amd]}"
|
112
112
|
end
|
113
113
|
|
114
114
|
def corr_prefix(titlenums, lang)
|
115
|
-
"#{corr_label(lang)}
|
115
|
+
"#{corr_label(lang)} #{titlenums[:corr]}"
|
116
116
|
end
|
117
117
|
|
118
118
|
def compose_title(tparts, tnums, lang)
|
@@ -121,10 +121,10 @@ module IsoDoc
|
|
121
121
|
main = @c.encode(tparts[:main].text, :hexadecimal)
|
122
122
|
tparts[:intro] &&
|
123
123
|
main = "#{@c.encode(tparts[:intro].text,
|
124
|
-
:hexadecimal)}
|
124
|
+
:hexadecimal)} — #{main}"
|
125
125
|
if tparts[:part]
|
126
126
|
suffix = part_title(tparts[:part], tnums, lang)
|
127
|
-
main = "#{main}
|
127
|
+
main = "#{main} — #{suffix}"
|
128
128
|
end
|
129
129
|
main
|
130
130
|
end
|
@@ -56,7 +56,7 @@ module IsoDoc
|
|
56
56
|
|
57
57
|
def eref_localities1_zh(target, type, from, upto, node)
|
58
58
|
ret = " 第#{from}" if from
|
59
|
-
ret += "
|
59
|
+
ret += "–#{upto}" if upto
|
60
60
|
if node["droploc"] != "true" && !subclause?(target, type, from)
|
61
61
|
ret += eref_locality_populate(type, node)
|
62
62
|
end
|
@@ -76,7 +76,7 @@ module IsoDoc
|
|
76
76
|
else ""
|
77
77
|
end
|
78
78
|
ret += " #{from}" if from
|
79
|
-
ret += "
|
79
|
+
ret += "–#{upto}" if upto
|
80
80
|
ret += ")" if type == "list"
|
81
81
|
l10n(ret)
|
82
82
|
end
|
@@ -29,7 +29,7 @@ module IsoDoc
|
|
29
29
|
def figure1(node)
|
30
30
|
lbl = @xrefs.anchor(node["id"], :label, false) or return
|
31
31
|
figname = node.parent.name == "figure" ? "" : "#{@i18n.figure} "
|
32
|
-
connective = node.parent.name == "figure" ? "
|
32
|
+
connective = node.parent.name == "figure" ? "  " : " — "
|
33
33
|
prefix_name(node, connective, l10n("#{figname}#{lbl}"), "name")
|
34
34
|
end
|
35
35
|
|
@@ -38,7 +38,7 @@ module IsoDoc
|
|
38
38
|
lbl = if n.nil? || blank?(n[:label]) then @i18n.example
|
39
39
|
else l10n("#{@i18n.example} #{n[:label]}")
|
40
40
|
end
|
41
|
-
prefix_name(node, "
|
41
|
+
prefix_name(node, " — ", lbl, "name")
|
42
42
|
end
|
43
43
|
|
44
44
|
def example_span_label(_node, div, name)
|
@@ -80,7 +80,7 @@ module IsoDoc
|
|
80
80
|
|
81
81
|
def eref_localities1_zh(target, type, from, upto, node)
|
82
82
|
ret = " 第#{from}" if from
|
83
|
-
ret += "
|
83
|
+
ret += "–#{upto}" if upto
|
84
84
|
node["droploc"] != "true" && !subclause?(target, type, from) and
|
85
85
|
ret += eref_locality_populate(type, node)
|
86
86
|
ret += ")" if type == "list"
|
@@ -97,7 +97,7 @@ module IsoDoc
|
|
97
97
|
node["droploc"] != "true" && !subclause?(target, type, from) and
|
98
98
|
ret = eref_locality_populate(type, node)
|
99
99
|
ret += " #{from}" if from
|
100
|
-
ret += "
|
100
|
+
ret += "–#{upto}" if upto
|
101
101
|
ret += ")" if type == "list"
|
102
102
|
ret = l10n(ret)
|
103
103
|
locality_span_wrap(ret, type)
|
data/lib/isodoc/iso/sections.rb
CHANGED
@@ -9,9 +9,9 @@ module IsoDoc
|
|
9
9
|
def middle_title_main(out)
|
10
10
|
out.p(**{ class: "zzSTDTitle1" }) do |p|
|
11
11
|
p << @meta.get[:doctitleintro]
|
12
|
-
p << "
|
12
|
+
p << " — " if @meta.get[:doctitleintro] && @meta.get[:doctitlemain]
|
13
13
|
p << @meta.get[:doctitlemain]
|
14
|
-
p << "
|
14
|
+
p << " — " if @meta.get[:doctitlemain] && @meta.get[:doctitlepart]
|
15
15
|
end
|
16
16
|
a = @meta.get[:doctitlepart] and out.p(**{ class: "zzSTDTitle2" }) do |p|
|
17
17
|
b = @meta.get[:doctitlepartlabel] and p << "#{b}: "
|
@@ -88,8 +88,8 @@ module IsoDoc
|
|
88
88
|
<span lang="EN-GB"><span
|
89
89
|
style='mso-element:field-begin'></span><span
|
90
90
|
style='mso-spacerun:yes'> </span>TOC
|
91
|
-
\\o
|
92
|
-
1;1;ANNEX;1;Biblio Title;1;Foreword Title;1;Intro Title;1
|
91
|
+
\\o "1-#{level}" \\h \\z \\t "Heading
|
92
|
+
1;1;ANNEX;1;Biblio Title;1;Foreword Title;1;Intro Title;1" <span
|
93
93
|
style='mso-element:field-separator'></span></span>
|
94
94
|
TOC
|
95
95
|
end
|
@@ -31,10 +31,19 @@ module IsoDoc
|
|
31
31
|
TableFootnote: "Tablefootnote",
|
32
32
|
formula: "Formula",
|
33
33
|
note: "Note",
|
34
|
+
example: "Example",
|
35
|
+
admonition: "Admonition",
|
36
|
+
admonitiontitle: "AdmonitionTitle",
|
37
|
+
sourcetitle: "SourceTitle",
|
38
|
+
tabletitle: "TableTitle",
|
39
|
+
titlepagesbhead: "TablePageSubhead",
|
34
40
|
NormRef: "RefNorm",
|
35
|
-
|
41
|
+
Biblio: "BiblioEntry",
|
36
42
|
MsoNormal: "MsoBodyText",
|
37
43
|
FigureTitle: "Figuretitle",
|
44
|
+
zzwarning: "zzWarning",
|
45
|
+
zzwarninghdr: "zzWarningHdr",
|
46
|
+
quoteattribution: "QuoteAttribution",
|
38
47
|
}.freeze
|
39
48
|
|
40
49
|
def dis_styles(docxml)
|
@@ -88,8 +97,8 @@ module IsoDoc
|
|
88
97
|
<<~TOC.freeze
|
89
98
|
<span lang="EN-GB"><span
|
90
99
|
style='mso-element:field-begin'></span><span
|
91
|
-
style='mso-spacerun:yes'> </span>TOC \\o
|
92
|
-
|
100
|
+
style='mso-spacerun:yes'> </span>TOC \\o "2-#{level}" \\h \\z \\t
|
101
|
+
"Heading 1;1;ANNEX;1;Biblio Title;1;Foreword Title;1;Intro Title;1;ANNEXN;1;ANNEXZ;1;na2;1;na3;1;na4;1;na5;1;na6;1;Title;1;Base_Heading;1;Box-title;1;Front Head;1;Index Head;1;AMEND Terms Heading;1;AMEND Heading 1 Unnumbered;1"
|
93
102
|
<span style='mso-element:field-separator'></span></span>
|
94
103
|
TOC
|
95
104
|
end
|
data/spec/isodoc/amd_spec.rb
CHANGED
@@ -755,22 +755,22 @@ RSpec.describe IsoDoc do
|
|
755
755
|
:docnumber_lang=>"ISO/PreNWIP3 17301-1:2016/Amd.1(E)",
|
756
756
|
:docnumber_reference=>"ISO/PreNWIP3 17301-1:2016/Amd.1:2017(E)",
|
757
757
|
:docnumeric=>"17301",
|
758
|
-
:docsubtitle=>"Introduction Française
|
758
|
+
:docsubtitle=>"Introduction Française — Titre Principal — Partie 1: Part du Titre",
|
759
759
|
:docsubtitleamd=>"Fraction massique de matière étrangère, riz usiné (non gluant), diviseurs d’échantillon et recommandations relatives aux conditions d’entreposage et de transport",
|
760
|
-
:docsubtitleamdlabel=>"AMENDMENT
|
761
|
-
:docsubtitlecorrlabel=>"RECTIFICATIF TECHNIQUE
|
760
|
+
:docsubtitleamdlabel=>"AMENDMENT 1",
|
761
|
+
:docsubtitlecorrlabel=>"RECTIFICATIF TECHNIQUE 2",
|
762
762
|
:docsubtitleintro=>"Introduction Française",
|
763
763
|
:docsubtitlemain=>"Titre Principal",
|
764
764
|
:docsubtitlepart=>"Part du Titre",
|
765
|
-
:docsubtitlepartlabel=>"Partie
|
766
|
-
:doctitle=>"Introduction
|
765
|
+
:docsubtitlepartlabel=>"Partie 1",
|
766
|
+
:doctitle=>"Introduction — Main Title — Title — Part 1: Title Part",
|
767
767
|
:doctitleamd=>"Mass fraction of extraneous matter, milled rice (nonglutinous), sample dividers and recommendations relating to storage and transport conditions",
|
768
|
-
:doctitleamdlabel=>"AMENDMENT
|
769
|
-
:doctitlecorrlabel=>"TECHNICAL CORRIGENDUM
|
768
|
+
:doctitleamdlabel=>"AMENDMENT 1",
|
769
|
+
:doctitlecorrlabel=>"TECHNICAL CORRIGENDUM 2",
|
770
770
|
:doctitleintro=>"Introduction",
|
771
771
|
:doctitlemain=>"Main Title — Title",
|
772
772
|
:doctitlepart=>"Title Part",
|
773
|
-
:doctitlepartlabel=>"Part
|
773
|
+
:doctitlepartlabel=>"Part 1",
|
774
774
|
:doctype=>"Amendment",
|
775
775
|
:doctype_display=>"Amendment",
|
776
776
|
:docyear=>"2017",
|
@@ -920,22 +920,22 @@ RSpec.describe IsoDoc do
|
|
920
920
|
:docnumber_lang=>"ISO/PreNWIP3 17301-1:2016/Amd.1(E)",
|
921
921
|
:docnumber_reference=>"ISO/PreNWIP3 17301-1:2016/Amd.1:2017(E)",
|
922
922
|
:docnumeric=>"17301",
|
923
|
-
:docsubtitle=>"Introduction
|
923
|
+
:docsubtitle=>"Introduction — Main Title — Title — Part 1: Title Part",
|
924
924
|
:docsubtitleamd=>"Mass fraction of extraneous matter, milled rice (nonglutinous), sample dividers and recommendations relating to storage and transport conditions",
|
925
|
-
:docsubtitleamdlabel=>"AMENDMENT
|
926
|
-
:docsubtitlecorrlabel=>"TECHNICAL CORRIGENDUM
|
925
|
+
:docsubtitleamdlabel=>"AMENDMENT 1",
|
926
|
+
:docsubtitlecorrlabel=>"TECHNICAL CORRIGENDUM 2",
|
927
927
|
:docsubtitleintro=>"Introduction",
|
928
928
|
:docsubtitlemain=>"Main Title — Title",
|
929
929
|
:docsubtitlepart=>"Title Part",
|
930
|
-
:docsubtitlepartlabel=>"Part
|
931
|
-
:doctitle=>"Introduction Française
|
930
|
+
:docsubtitlepartlabel=>"Part 1",
|
931
|
+
:doctitle=>"Introduction Française — Titre Principal — Partie 1: Part du Titre",
|
932
932
|
:doctitleamd=>"Fraction massique de matière étrangère, riz usiné (non gluant), diviseurs d’échantillon et recommandations relatives aux conditions d’entreposage et de transport",
|
933
|
-
:doctitleamdlabel=>"AMENDMENT
|
934
|
-
:doctitlecorrlabel=>"RECTIFICATIF TECHNIQUE
|
933
|
+
:doctitleamdlabel=>"AMENDMENT 1",
|
934
|
+
:doctitlecorrlabel=>"RECTIFICATIF TECHNIQUE 2",
|
935
935
|
:doctitleintro=>"Introduction Française",
|
936
936
|
:doctitlemain=>"Titre Principal",
|
937
937
|
:doctitlepart=>"Part du Titre",
|
938
|
-
:doctitlepartlabel=>"Partie
|
938
|
+
:doctitlepartlabel=>"Partie 1",
|
939
939
|
:doctype=>"Amendment",
|
940
940
|
:doctype_display=>"Amendment",
|
941
941
|
:docyear=>"2017",
|
@@ -97,21 +97,21 @@ RSpec.describe IsoDoc::Iso::Metadata do
|
|
97
97
|
:circulateddate=>"XXX",
|
98
98
|
:confirmeddate=>"XXX",
|
99
99
|
:copieddate=>"XXX",
|
100
|
-
:createddate=>"2010
|
100
|
+
:createddate=>"2010–2011",
|
101
101
|
:docnumber=>"ISO/PreCD3 17301-1",
|
102
102
|
:docnumber_lang=>"ISO/PreCD3 17301-1 (E)",
|
103
103
|
:docnumber_reference=>"ISO/PreCD3 17301-1:2000 (E)",
|
104
104
|
:docnumeric=>"1730",
|
105
|
-
:docsubtitle=>"Céréales et légumineuses
|
105
|
+
:docsubtitle=>"Céréales et légumineuses — Spécification et méthodes d'essai — Partie 1: Riz",
|
106
106
|
:docsubtitleintro=>"Céréales et légumineuses",
|
107
107
|
:docsubtitlemain=>"Spécification et méthodes d'essai",
|
108
108
|
:docsubtitlepart=>"Riz",
|
109
|
-
:docsubtitlepartlabel=>"Partie
|
110
|
-
:doctitle=>"Cereals and pulses
|
109
|
+
:docsubtitlepartlabel=>"Partie 1",
|
110
|
+
:doctitle=>"Cereals and pulses — Specifications and test methods — Part 1: Rice",
|
111
111
|
:doctitleintro=>"Cereals and pulses",
|
112
112
|
:doctitlemain=>"Specifications and test methods",
|
113
113
|
:doctitlepart=>"Rice",
|
114
|
-
:doctitlepartlabel=>"Part
|
114
|
+
:doctitlepartlabel=>"Part 1",
|
115
115
|
:doctype=>"International Standard",
|
116
116
|
:doctype_display=>"International Standard",
|
117
117
|
:docyear=>"2016",
|
@@ -238,16 +238,16 @@ RSpec.describe IsoDoc::Iso::Metadata do
|
|
238
238
|
:docnumber=>"ISO/IEC/CD 17301-1-3",
|
239
239
|
:docnumber_lang=>"ISO/IEC/CD 17301-1-3 (E)",
|
240
240
|
:docnumber_reference=>"ISO/IEC/CD 17301-1-3 (E)",
|
241
|
-
:docsubtitle=>"Céréales et légumineuses
|
241
|
+
:docsubtitle=>"Céréales et légumineuses — Spécification et méthodes d'essai — Partie 1–3: Riz",
|
242
242
|
:docsubtitleintro=>"Céréales et légumineuses",
|
243
243
|
:docsubtitlemain=>"Spécification et méthodes d'essai",
|
244
244
|
:docsubtitlepart=>"Riz",
|
245
|
-
:docsubtitlepartlabel=>"Partie
|
246
|
-
:doctitle=>"Cereals and pulses
|
245
|
+
:docsubtitlepartlabel=>"Partie 1–3",
|
246
|
+
:doctitle=>"Cereals and pulses — Specifications and test methods — Part 1–3: Rice",
|
247
247
|
:doctitleintro=>"Cereals and pulses",
|
248
248
|
:doctitlemain=>"Specifications and test methods",
|
249
249
|
:doctitlepart=>"Rice",
|
250
|
-
:doctitlepartlabel=>"Part
|
250
|
+
:doctitlepartlabel=>"Part 1–3",
|
251
251
|
:doctype=>"International Standard",
|
252
252
|
:doctype_display=>"International Standard",
|
253
253
|
:docyear=>"2016",
|
@@ -374,16 +374,16 @@ RSpec.describe IsoDoc::Iso::Metadata do
|
|
374
374
|
:docnumber=>"ISO/IEC/CD 17301-1-3",
|
375
375
|
:docnumber_lang=>"ISO/IEC/CD 17301-1-3 (E)",
|
376
376
|
:docnumber_reference=>"ISO/IEC/CD 17301-1-3 (E)",
|
377
|
-
:docsubtitle=>"Cereals and pulses
|
377
|
+
:docsubtitle=>"Cereals and pulses — Specifications and test methods — Part 1–3: Rice",
|
378
378
|
:docsubtitleintro=>"Cereals and pulses",
|
379
379
|
:docsubtitlemain=>"Specifications and test methods",
|
380
380
|
:docsubtitlepart=>"Rice",
|
381
|
-
:docsubtitlepartlabel=>"Part
|
382
|
-
:doctitle=>"Céréales et légumineuses
|
381
|
+
:docsubtitlepartlabel=>"Part 1–3",
|
382
|
+
:doctitle=>"Céréales et légumineuses — Spécification et méthodes d'essai — Partie 1–3: Riz",
|
383
383
|
:doctitleintro=>"Céréales et légumineuses",
|
384
384
|
:doctitlemain=>"Spécification et méthodes d'essai",
|
385
385
|
:doctitlepart=>"Riz",
|
386
|
-
:doctitlepartlabel=>"Partie
|
386
|
+
:doctitlepartlabel=>"Partie 1–3",
|
387
387
|
:doctype=>"International Standard",
|
388
388
|
:doctype_display=>"Standard International",
|
389
389
|
:docyear=>"2016",
|
@@ -515,16 +515,16 @@ RSpec.describe IsoDoc::Iso::Metadata do
|
|
515
515
|
:docnumber=>"ISO/IEC/CD 17301-1-3",
|
516
516
|
:docnumber_lang=>"ISO/IEC/CD 17301-1-3 (E)",
|
517
517
|
:docnumber_reference=>"ISO/IEC/CD 17301-1-3 (E)",
|
518
|
-
:docsubtitle=>"Cereals and pulses
|
518
|
+
:docsubtitle=>"Cereals and pulses — Specifications and test methods — Part 1–3: Rice",
|
519
519
|
:docsubtitleintro=>"Cereals and pulses",
|
520
520
|
:docsubtitlemain=>"Specifications and test methods",
|
521
521
|
:docsubtitlepart=>"Rice",
|
522
|
-
:docsubtitlepartlabel=>"Part
|
523
|
-
:doctitle=>"Зерновые и бобовые
|
522
|
+
:docsubtitlepartlabel=>"Part 1–3",
|
523
|
+
:doctitle=>"Зерновые и бобовые — Технические характеристики и методы испытаний — Часть 1–3: Рис",
|
524
524
|
:doctitleintro=>"Зерновые и бобовые",
|
525
525
|
:doctitlemain=>"Технические характеристики и методы испытаний",
|
526
526
|
:doctitlepart=>"Рис",
|
527
|
-
:doctitlepartlabel=>"
|
527
|
+
:doctitlepartlabel=>"Часть 1–3",
|
528
528
|
:doctype=>"International Standard",
|
529
529
|
:doctype_display=>"International Standard",
|
530
530
|
:docyear=>"2016",
|
@@ -381,6 +381,7 @@ RSpec.describe IsoDoc do
|
|
381
381
|
word = File.read("test.doc", encoding: "UTF-8")
|
382
382
|
.sub(/^.*An empty word intro page\./m, "")
|
383
383
|
.sub(%r{</div>.*$}m, "</div>")
|
384
|
+
.gsub(/<o:p> <\/o:p>/, "")
|
384
385
|
|
385
386
|
expect(xmlpp("<div>#{word.gsub(/_Toc\d\d+/, '_Toc')}"))
|
386
387
|
.to be_equivalent_to xmlpp(<<~'OUTPUT')
|
@@ -486,7 +487,6 @@ RSpec.describe IsoDoc do
|
|
486
487
|
<span style="mso-element:field-end"/>
|
487
488
|
</span>
|
488
489
|
<span lang="EN-GB" xml:lang="EN-GB">
|
489
|
-
<p class="MsoNormal"> </p>
|
490
490
|
</span>
|
491
491
|
</p>
|
492
492
|
<p class="MsoNormal"> </p>
|
@@ -1030,7 +1030,8 @@ RSpec.describe IsoDoc do
|
|
1030
1030
|
'<div class="WordSection2">')
|
1031
1031
|
.sub(%r{<p class="MsoNormal">\s*<br clear="all" class="section"/>\s*</p>\s*<div class="WordSection3">.*$}m, "")
|
1032
1032
|
|
1033
|
-
expect(xmlpp(word.gsub(/_Toc\d\d+/, "_Toc")
|
1033
|
+
expect(xmlpp(word.gsub(/_Toc\d\d+/, "_Toc")
|
1034
|
+
.gsub(/<o:p> <\/o:p>/, "")))
|
1034
1035
|
.to be_equivalent_to xmlpp(<<~'OUTPUT')
|
1035
1036
|
<div class="WordSection2">An empty word intro page.
|
1036
1037
|
<p class="MsoToc1">
|
@@ -1110,7 +1111,6 @@ RSpec.describe IsoDoc do
|
|
1110
1111
|
<span style="mso-element:field-end"/>
|
1111
1112
|
</span>
|
1112
1113
|
<span lang="EN-GB" xml:lang="EN-GB">
|
1113
|
-
<p class="MsoNormal"> </p>
|
1114
1114
|
</span>
|
1115
1115
|
</p>
|
1116
1116
|
<p class="MsoNormal"> </p>
|
data/spec/spec_helper.rb
CHANGED
@@ -60,6 +60,13 @@ def metadata(hash)
|
|
60
60
|
end
|
61
61
|
|
62
62
|
def xmlpp(xml)
|
63
|
+
c = HTMLEntities.new
|
64
|
+
xml &&= xml.split(/(&\S+?;)/).map do |n|
|
65
|
+
if /^&\S+?;$/.match?(n)
|
66
|
+
c.encode(c.decode(n), :hexadecimal)
|
67
|
+
else n
|
68
|
+
end
|
69
|
+
end.join
|
63
70
|
s = ""
|
64
71
|
f = REXML::Formatters::Pretty.new(2)
|
65
72
|
f.compact = true
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-iso
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-05-
|
11
|
+
date: 2022-05-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-standoc
|