isodoc 1.8.0 → 1.8.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/convert.rb +8 -0
- data/lib/isodoc/function/inline.rb +2 -4
- data/lib/isodoc/html_function/html.rb +1 -0
- data/lib/isodoc/html_function/postprocess.rb +4 -6
- data/lib/isodoc/metadata_date.rb +13 -11
- data/lib/isodoc/presentation_function/bibdata.rb +2 -2
- data/lib/isodoc/version.rb +1 -1
- data/lib/isodoc/word_function/body.rb +24 -14
- data/lib/isodoc/word_function/comments.rb +0 -4
- data/lib/isodoc/xref/xref_gen.rb +18 -22
- data/lib/isodoc/xref/xref_gen_seq.rb +10 -16
- data/spec/isodoc/blocks_spec.rb +14 -8
- data/spec/isodoc/lists_spec.rb +344 -222
- data/spec/isodoc/table_spec.rb +71 -73
- data/spec/isodoc/xref_numbering_spec.rb +347 -0
- data/spec/isodoc/xref_spec.rb +268 -347
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ec504b3b905ec960bef74398b3789ab5b7eb248dc05a7c3f64590db77d31cac6
|
4
|
+
data.tar.gz: c2de4c1589a7ff282715f4930a1851393358a64fd407c5a1e3bda02beddc0782
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34a1c43f6f34f90aa326ed7ff50ede791eadaf22c05ebf0f4183fb2cb3c708bd4f0512572b638a94e236b807f5a873986c24579fe126eb88ad15ef1e178c64d2
|
7
|
+
data.tar.gz: 23fbe4f295729ad565ab787903e9c4b49388671766b91477dc3d26302b8499da892f77d6e034ce4f6cc4ba1b0956c8dbb051e94a3a336acdb661d1e6d30e584b
|
data/lib/isodoc/convert.rb
CHANGED
@@ -119,6 +119,7 @@ module IsoDoc
|
|
119
119
|
|
120
120
|
def convert1(docxml, filename, dir)
|
121
121
|
@xrefs.parse docxml
|
122
|
+
bibitem_lookup(docxml)
|
122
123
|
noko do |xml|
|
123
124
|
xml.html **{ lang: @lang.to_s } do |html|
|
124
125
|
html.parent.add_namespace("epub", "http://www.idpf.org/2007/ops")
|
@@ -130,6 +131,13 @@ module IsoDoc
|
|
130
131
|
end.join("\n")
|
131
132
|
end
|
132
133
|
|
134
|
+
def bibitem_lookup(docxml)
|
135
|
+
@bibitems = docxml.xpath(ns("//references/bibitem"))
|
136
|
+
.each_with_object({}) do |b, m|
|
137
|
+
m[b["id"]] = b
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
133
141
|
def metadata_init(lang, script, i18n)
|
134
142
|
@meta = Metadata.new(lang, script, i18n)
|
135
143
|
end
|
@@ -41,10 +41,8 @@ module IsoDoc
|
|
41
41
|
end
|
42
42
|
|
43
43
|
def eref_target(node)
|
44
|
-
|
45
|
-
|
46
|
-
"uri[@type = 'citation']"))
|
47
|
-
return href unless url
|
44
|
+
return "##{node['bibitemid']}" unless url = @bibitems[node["bibitemid"]]
|
45
|
+
&.at(ns("./uri[@type = 'citation']"))
|
48
46
|
|
49
47
|
href = suffix_url(url.text)
|
50
48
|
anchor = node&.at(ns(".//locality[@type = 'anchor']"))&.text&.strip
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require "isodoc/html_function/mathvariant_to_plain"
|
2
2
|
require_relative "postprocess_footnotes"
|
3
|
+
require "metanorma-utils"
|
3
4
|
|
4
5
|
module IsoDoc
|
5
6
|
module HtmlFunction
|
@@ -74,7 +75,8 @@ module IsoDoc
|
|
74
75
|
head = docxml.at("//*[local-name() = 'head']")
|
75
76
|
head << htmlstylesheet(@htmlstylesheet)
|
76
77
|
s = htmlstylesheet(@htmlstylesheet_override) and head << s
|
77
|
-
@bare and
|
78
|
+
@bare and
|
79
|
+
head << "<style>body {margin-left: 2em; margin-right: 2em;}</style>"
|
78
80
|
docxml
|
79
81
|
end
|
80
82
|
|
@@ -167,11 +169,7 @@ module IsoDoc
|
|
167
169
|
end
|
168
170
|
|
169
171
|
def datauri(img)
|
170
|
-
|
171
|
-
supertype = type == "xml" ? "application" : "image"
|
172
|
-
bin = IO.binread(image_localfile(img))
|
173
|
-
data = Base64.strict_encode64(bin)
|
174
|
-
img["src"] = "data:#{supertype}/#{type};base64,#{data}"
|
172
|
+
img["src"] = Metanorma::Utils::datauri(img["src"], @localdir)
|
175
173
|
end
|
176
174
|
|
177
175
|
def image_suffix(img)
|
data/lib/isodoc/metadata_date.rb
CHANGED
@@ -6,7 +6,7 @@ module IsoDoc
|
|
6
6
|
vote-ended}.freeze
|
7
7
|
|
8
8
|
def months
|
9
|
-
|
9
|
+
{
|
10
10
|
"01": @labels["month_january"],
|
11
11
|
"02": @labels["month_february"],
|
12
12
|
"03": @labels["month_march"],
|
@@ -19,30 +19,32 @@ module IsoDoc
|
|
19
19
|
"10": @labels["month_october"],
|
20
20
|
"11": @labels["month_november"],
|
21
21
|
"12": @labels["month_december"],
|
22
|
-
|
22
|
+
}
|
23
23
|
end
|
24
24
|
|
25
25
|
def monthyr(isodate)
|
26
26
|
m = /(?<yr>\d\d\d\d)-(?<mo>\d\d)/.match isodate
|
27
27
|
return isodate unless m && m[:yr] && m[:mo]
|
28
|
+
|
28
29
|
l10n("#{months[m[:mo].to_sym]} #{m[:yr]}",
|
29
|
-
|
30
|
+
@lang, @script)
|
30
31
|
end
|
31
32
|
|
32
33
|
def MMMddyyyy(isodate)
|
33
34
|
return nil if isodate.nil?
|
35
|
+
|
34
36
|
arr = isodate.split("-")
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
37
|
+
if arr.size == 1 && (/^\d+$/.match isodate)
|
38
|
+
Date.new(*arr.map(&:to_i)).strftime("%Y")
|
39
|
+
elsif arr.size == 2
|
40
|
+
Date.new(*arr.map(&:to_i)).strftime("%B %Y")
|
41
|
+
else
|
42
|
+
Date.parse(isodate).strftime("%B %d, %Y")
|
43
|
+
end
|
42
44
|
end
|
43
45
|
|
44
46
|
def bibdate(isoxml, _out)
|
45
|
-
isoxml.xpath(ns(
|
47
|
+
isoxml.xpath(ns("//bibdata/date")).each do |d|
|
46
48
|
set("#{d['type'].gsub(/-/, '_')}date".to_sym, Common::date_range(d))
|
47
49
|
end
|
48
50
|
end
|
@@ -10,7 +10,7 @@ module IsoDoc
|
|
10
10
|
"</localized-strings>"
|
11
11
|
end
|
12
12
|
|
13
|
-
|
13
|
+
def docid_prefixes(docxml)
|
14
14
|
docxml.xpath(ns("//references/bibitem/docidentifier")).each do |i|
|
15
15
|
i.children = @xrefs.klass.docid_prefix(i["type"], i.text)
|
16
16
|
end
|
@@ -97,7 +97,7 @@ module IsoDoc
|
|
97
97
|
|
98
98
|
# https://stackoverflow.com/a/31822406
|
99
99
|
def blank?(elem)
|
100
|
-
elem.nil? || elem.respond_to?(:empty?) && elem.empty?
|
100
|
+
elem.nil? || (elem.respond_to?(:empty?) && elem.empty?)
|
101
101
|
end
|
102
102
|
|
103
103
|
def trim_hash(hash)
|
data/lib/isodoc/version.rb
CHANGED
@@ -54,11 +54,11 @@ module IsoDoc
|
|
54
54
|
end
|
55
55
|
|
56
56
|
def para_class(_node)
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
57
|
+
return "Sourcecode" if @annotation
|
58
|
+
return "MsoCommentText" if @in_comment
|
59
|
+
return "Note" if @note
|
60
|
+
|
61
|
+
nil
|
62
62
|
end
|
63
63
|
|
64
64
|
def para_parse(node, out)
|
@@ -86,21 +86,31 @@ module IsoDoc
|
|
86
86
|
end
|
87
87
|
|
88
88
|
def dl_parse(node, out)
|
89
|
+
return super unless node.ancestors("table, dl").empty?
|
90
|
+
|
91
|
+
dl_parse_table(node, out)
|
92
|
+
end
|
93
|
+
|
94
|
+
def dl_parse_table(node, out)
|
89
95
|
out.table **{ class: "dl" } do |v|
|
90
96
|
node.elements.select { |n| dt_dd? n }.each_slice(2) do |dt, dd|
|
91
|
-
v
|
92
|
-
tr.td **{ valign: "top", align: "left" } do |term|
|
93
|
-
dt_parse(dt, term)
|
94
|
-
end
|
95
|
-
tr.td **{ valign: "top" } do |listitem|
|
96
|
-
dd.children.each { |n| parse(n, listitem) }
|
97
|
-
end
|
98
|
-
end
|
97
|
+
dl_parse_table1(v, dt, dd)
|
99
98
|
end
|
100
99
|
dl_parse_notes(node, v)
|
101
100
|
end
|
102
101
|
end
|
103
102
|
|
103
|
+
def dl_parse_table1(table, dterm, ddefn)
|
104
|
+
table.tr do |tr|
|
105
|
+
tr.td **{ valign: "top", align: "left" } do |term|
|
106
|
+
dt_parse(dterm, term)
|
107
|
+
end
|
108
|
+
tr.td **{ valign: "top" } do |listitem|
|
109
|
+
ddefn.children.each { |n| parse(n, listitem) }
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
104
114
|
def dl_parse_notes(node, out)
|
105
115
|
return if node.elements.reject { |n| dt_dd? n }.empty?
|
106
116
|
|
@@ -120,8 +130,8 @@ module IsoDoc
|
|
120
130
|
dl
|
121
131
|
end
|
122
132
|
|
133
|
+
# get rid of footnote link, it is in diagram
|
123
134
|
def figure_aside_process(fig, aside, key)
|
124
|
-
# get rid of footnote link, it is in diagram
|
125
135
|
fig&.at("./a[@class='TableFootnoteRef']")&.remove
|
126
136
|
fnref = fig.at(".//span[@class='TableFootnoteRef']/..")
|
127
137
|
tr = key.add_child("<tr></tr>").first
|
data/lib/isodoc/xref/xref_gen.rb
CHANGED
@@ -7,6 +7,10 @@ module IsoDoc
|
|
7
7
|
recommendation permission figure table formula
|
8
8
|
admonition sourcecode).freeze
|
9
9
|
|
10
|
+
def blank?(text)
|
11
|
+
text.nil? || text.empty?
|
12
|
+
end
|
13
|
+
|
10
14
|
def amend_preprocess(xmldoc)
|
11
15
|
xmldoc.xpath(ns("//amend[newcontent]")).each do |a|
|
12
16
|
autonum = amend_autonums(a)
|
@@ -39,11 +43,9 @@ module IsoDoc
|
|
39
43
|
end
|
40
44
|
|
41
45
|
def termnote_anchor_names(docxml)
|
42
|
-
docxml.xpath(ns("//term[
|
46
|
+
docxml.xpath(ns("//term[termnote]")).each do |t|
|
43
47
|
c = Counter.new
|
44
|
-
t.xpath(ns("
|
45
|
-
next if n["id"].nil? || n["id"].empty?
|
46
|
-
|
48
|
+
t.xpath(ns("./termnote")).reject { |n| blank?(n["id"]) }.each do |n|
|
47
49
|
c.increment(n)
|
48
50
|
@anchors[n["id"]] =
|
49
51
|
{ label: termnote_label(c.print), type: "termnote", value: c.print,
|
@@ -54,18 +56,18 @@ module IsoDoc
|
|
54
56
|
end
|
55
57
|
|
56
58
|
def termexample_anchor_names(docxml)
|
57
|
-
docxml.xpath(ns("//term[
|
58
|
-
examples = t.xpath(ns("
|
59
|
+
docxml.xpath(ns("//term[termexample]")).each do |t|
|
60
|
+
examples = t.xpath(ns("./termexample"))
|
59
61
|
c = Counter.new
|
60
|
-
examples.each do |n|
|
61
|
-
next if n["id"].nil? || n["id"].empty?
|
62
|
-
|
62
|
+
examples.reject { |n| blank?(n["id"]) }.each do |n|
|
63
63
|
c.increment(n)
|
64
64
|
idx = increment_label(examples, n, c, false)
|
65
65
|
@anchors[n["id"]] =
|
66
|
-
{ type: "termexample", label: idx, value: c.print,
|
67
|
-
|
68
|
-
|
66
|
+
# { type: "termexample", label: idx, value: c.print,
|
67
|
+
# xref: l10n("#{anchor(t['id'], :xref)}, "\
|
68
|
+
# "#{@labels['example_xref']} #{c.print}") }
|
69
|
+
anchor_struct(idx, n,
|
70
|
+
@labels["example_xref"], "termexample", n["unnumbered"])
|
69
71
|
end
|
70
72
|
end
|
71
73
|
end
|
@@ -127,9 +129,7 @@ module IsoDoc
|
|
127
129
|
notes = s.xpath(ns(".//ol")) - s.xpath(ns(".//clause//ol")) -
|
128
130
|
s.xpath(ns(".//appendix//ol")) - s.xpath(ns(".//ol//ol"))
|
129
131
|
c = Counter.new
|
130
|
-
notes.each do |n|
|
131
|
-
next if n["id"].nil? || n["id"].empty?
|
132
|
-
|
132
|
+
notes.reject { |n| blank?(n["id"]) }.each do |n|
|
133
133
|
@anchors[n["id"]] = anchor_struct(increment_label(notes, n, c), n,
|
134
134
|
@labels["list"], "list", false)
|
135
135
|
list_item_anchor_names(n, @anchors[n["id"]], 1, "", notes.size != 1)
|
@@ -158,9 +158,7 @@ module IsoDoc
|
|
158
158
|
notes = s.xpath(ns(".//dl")) - s.xpath(ns(".//clause//dl")) -
|
159
159
|
s.xpath(ns(".//appendix//dl")) - s.xpath(ns(".//dl//dl"))
|
160
160
|
c = Counter.new
|
161
|
-
notes.each do |n|
|
162
|
-
next if n["id"].nil? || n["id"].empty?
|
163
|
-
|
161
|
+
notes.reject { |n| blank?(n["id"]) }.each do |n|
|
164
162
|
@anchors[n["id"]] =
|
165
163
|
anchor_struct(increment_label(notes, n, c), n,
|
166
164
|
@labels["deflist"], "deflist", false)
|
@@ -183,10 +181,8 @@ module IsoDoc
|
|
183
181
|
end
|
184
182
|
end
|
185
183
|
|
186
|
-
def bookmark_anchor_names(
|
187
|
-
|
188
|
-
next if n["id"].nil? || n["id"].empty?
|
189
|
-
|
184
|
+
def bookmark_anchor_names(xml)
|
185
|
+
xml.xpath(ns(".//bookmark")).reject { |n| blank?(n["id"]) }.each do |n|
|
190
186
|
parent = nil
|
191
187
|
n.ancestors.each do |a|
|
192
188
|
next unless a["id"] && parent = @anchors.dig(a["id"], :xref)
|
@@ -34,8 +34,7 @@ module IsoDoc::XrefGen
|
|
34
34
|
|
35
35
|
def sequential_table_names(clause)
|
36
36
|
c = Counter.new
|
37
|
-
clause.xpath(ns(".//table")).each do |t|
|
38
|
-
next if t["id"].nil? || t["id"].empty?
|
37
|
+
clause.xpath(ns(".//table")).reject { |n| blank?(n["id"]) }.each do |t|
|
39
38
|
|
40
39
|
@anchors[t["id"]] = anchor_struct(
|
41
40
|
c.increment(t).print, nil,
|
@@ -46,8 +45,7 @@ module IsoDoc::XrefGen
|
|
46
45
|
|
47
46
|
def sequential_formula_names(clause)
|
48
47
|
c = Counter.new
|
49
|
-
clause.xpath(ns(".//formula")).each do |t|
|
50
|
-
next if t["id"].nil? || t["id"].empty?
|
48
|
+
clause.xpath(ns(".//formula")).reject { |n| blank?(n["id"]) }.each do |t|
|
51
49
|
|
52
50
|
@anchors[t["id"]] = anchor_struct(
|
53
51
|
c.increment(t).print, t,
|
@@ -62,8 +60,8 @@ module IsoDoc::XrefGen
|
|
62
60
|
|
63
61
|
def sequential_permission_names(clause, klass, label)
|
64
62
|
c = Counter.new
|
65
|
-
clause.xpath(ns(".//#{klass}#{FIRST_LVL_REQ}"))
|
66
|
-
|
63
|
+
clause.xpath(ns(".//#{klass}#{FIRST_LVL_REQ}"))
|
64
|
+
.reject { |n| blank?(n["id"]) }.each do |t|
|
67
65
|
|
68
66
|
id = c.increment(t).print
|
69
67
|
@anchors[t["id"]] = anchor_struct(id, t, label, klass, t["unnumbered"])
|
@@ -82,8 +80,7 @@ module IsoDoc::XrefGen
|
|
82
80
|
|
83
81
|
def sequential_permission_names1(block, lbl, klass, label)
|
84
82
|
c = Counter.new
|
85
|
-
block.xpath(ns("./#{klass}")).each do |t|
|
86
|
-
next if t["id"].nil? || t["id"].empty?
|
83
|
+
block.xpath(ns("./#{klass}")).reject { |n| blank?(n["id"]) }.each do |t|
|
87
84
|
|
88
85
|
id = "#{lbl}#{hierfigsep}#{c.increment(t).print}"
|
89
86
|
@anchors[t["id"]] = anchor_struct(id, t, label, klass, t["unnumbered"])
|
@@ -118,8 +115,7 @@ module IsoDoc::XrefGen
|
|
118
115
|
|
119
116
|
def hierarchical_table_names(clause, num)
|
120
117
|
c = Counter.new
|
121
|
-
clause.xpath(ns(".//table")).each do |t|
|
122
|
-
next if t["id"].nil? || t["id"].empty?
|
118
|
+
clause.xpath(ns(".//table")).reject { |n| blank?(n["id"]) }.each do |t|
|
123
119
|
|
124
120
|
@anchors[t["id"]] =
|
125
121
|
anchor_struct("#{num}#{hiersep}#{c.increment(t).print}",
|
@@ -141,8 +137,7 @@ module IsoDoc::XrefGen
|
|
141
137
|
|
142
138
|
def hierarchical_formula_names(clause, num)
|
143
139
|
c = Counter.new
|
144
|
-
clause.xpath(ns(".//formula")).each do |t|
|
145
|
-
next if t["id"].nil? || t["id"].empty?
|
140
|
+
clause.xpath(ns(".//formula")).reject { |n| blank?(n["id"]) }.each do |t|
|
146
141
|
|
147
142
|
@anchors[t["id"]] = anchor_struct(
|
148
143
|
"#{num}#{hiersep}#{c.increment(t).print}", nil,
|
@@ -154,8 +149,8 @@ module IsoDoc::XrefGen
|
|
154
149
|
|
155
150
|
def hierarchical_permission_names(clause, num, klass, label)
|
156
151
|
c = Counter.new
|
157
|
-
clause.xpath(ns(".//#{klass}#{FIRST_LVL_REQ}"))
|
158
|
-
|
152
|
+
clause.xpath(ns(".//#{klass}#{FIRST_LVL_REQ}"))
|
153
|
+
.reject { |n| blank?(n["id"]) }.each do |t|
|
159
154
|
|
160
155
|
id = "#{num}#{hiersep}#{c.increment(t).print}"
|
161
156
|
@anchors[t["id"]] =
|
@@ -175,8 +170,7 @@ module IsoDoc::XrefGen
|
|
175
170
|
|
176
171
|
def hierarchical_permission_names1(block, lbl, klass, label)
|
177
172
|
c = Counter.new
|
178
|
-
block.xpath(ns("./#{klass}")).each do |t|
|
179
|
-
next if t["id"].nil? || t["id"].empty?
|
173
|
+
block.xpath(ns("./#{klass}")).reject { |n| blank?(n["id"]) }.each do |t|
|
180
174
|
|
181
175
|
id = "#{lbl}#{hierfigsep}#{c.increment(t).print}"
|
182
176
|
@anchors[t["id"]] =
|
data/spec/isodoc/blocks_spec.rb
CHANGED
@@ -809,8 +809,11 @@ RSpec.describe IsoDoc do
|
|
809
809
|
expect(xmlpp(IsoDoc::PresentationXMLConvert.new({})
|
810
810
|
.convert("test", input, true)
|
811
811
|
.gsub(/</, "<")
|
812
|
-
.gsub(%r{data:application/x-msmetafile[^"']+},
|
813
|
-
|
812
|
+
.gsub(%r{data:application/x-msmetafile[^"']+},
|
813
|
+
"data:application/x-msmetafile")))
|
814
|
+
.to be_equivalent_to xmlpp(presxml
|
815
|
+
.gsub(%r{data:application/x-msmetafile[^"']+},
|
816
|
+
"data:application/x-msmetafile"))
|
814
817
|
expect(xmlpp(strip_guid(IsoDoc::HtmlConvert.new({})
|
815
818
|
.convert("test", presxml, true)))).to be_equivalent_to xmlpp(html)
|
816
819
|
expect(xmlpp(strip_guid(IsoDoc::WordConvert.new({})
|
@@ -900,9 +903,11 @@ RSpec.describe IsoDoc do
|
|
900
903
|
expect(xmlpp(IsoDoc::PresentationXMLConvert.new({})
|
901
904
|
.convert("test", input, true)
|
902
905
|
.gsub(/</, "<")
|
903
|
-
.gsub(%r{data:application/x-msmetafile[^"']+},
|
906
|
+
.gsub(%r{data:application/x-msmetafile[^"']+},
|
907
|
+
"data:application/x-msmetafile")))
|
904
908
|
.to be_equivalent_to xmlpp(presxml
|
905
|
-
.gsub(
|
909
|
+
.gsub(%r{data:application/x-msmetafile[^"']+},
|
910
|
+
"data:application/x-msmetafile"))
|
906
911
|
expect(xmlpp(strip_guid(IsoDoc::WordConvert.new({})
|
907
912
|
.convert("test", presxml, true)
|
908
913
|
.gsub(/['"][^'".]+(?<!odf1)(?<!odf)\.emf['"]/, "'_.emf'")
|
@@ -991,9 +996,11 @@ RSpec.describe IsoDoc do
|
|
991
996
|
expect(xmlpp(IsoDoc::PresentationXMLConvert.new({})
|
992
997
|
.convert("test", input, true)
|
993
998
|
.gsub(/</, "<")
|
994
|
-
.gsub(%r{data:application/x-msmetafile[^"']+},
|
999
|
+
.gsub(%r{data:application/x-msmetafile[^"']+},
|
1000
|
+
"data:application/x-msmetafile")))
|
995
1001
|
.to be_equivalent_to xmlpp(presxml
|
996
|
-
.gsub(
|
1002
|
+
.gsub(%r{data:application/x-msmetafile[^"']+},
|
1003
|
+
"data:application/x-msmetafile"))
|
997
1004
|
expect(xmlpp(strip_guid(IsoDoc::WordConvert.new({})
|
998
1005
|
.convert("test", presxml, true)
|
999
1006
|
.gsub(/['"][^'".]+(?<!odf1)(?<!odf)\.svg['"]/, "'_.svg'")
|
@@ -2521,8 +2528,7 @@ RSpec.describe IsoDoc do
|
|
2521
2528
|
.convert("test", input, true))
|
2522
2529
|
.sub(%r{<localized-strings>.*</localized-strings>}m, "")
|
2523
2530
|
.gsub(%r{"\.\\}, '"./')
|
2524
|
-
.gsub(%r{'\.\\}, "'./")
|
2525
|
-
)
|
2531
|
+
.gsub(%r{'\.\\}, "'./"))
|
2526
2532
|
.to be_equivalent_to xmlpp(output)
|
2527
2533
|
end
|
2528
2534
|
|