isodoc 2.0.5.1 → 2.0.5.2
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/lib/isodoc/presentation_function/inline.rb +9 -5
- data/lib/isodoc/version.rb +1 -1
- data/lib/isodoc/word_function/body.rb +1 -1
- data/spec/isodoc/inline_spec.rb +4 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '099aeb3456fabbcbd95076b6ccb9826997871b9d85ff079fc04aadf82a491a80'
|
4
|
+
data.tar.gz: 4002cee22c77b7a64f69864f3a67990cdfedddd458f95e86921ff132a804fe10
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5342970e267f7a1b8c259d7c06c8cd27e5600cc0ff4d33033f5d8e5206d335050dd4d6f989f68220d8adc0966483f26c30e472b51cacbe93268ddbd24c42e1c7
|
7
|
+
data.tar.gz: 0f03dd6d85ada4c98a13b0a1bfe6c86b19d0dc5d02fc759a334d560eeed1ad7642a2c25c1442610187206d41a24aa058db3e16fb6f7a96d0e19ed6752a244290
|
@@ -50,7 +50,7 @@ module IsoDoc
|
|
50
50
|
node["droploc"] = true
|
51
51
|
ret = resolve_eref_connectives(eref_locality_stacks(refs, target,
|
52
52
|
node))
|
53
|
-
node
|
53
|
+
node.delete("droploc") unless droploc
|
54
54
|
eref_localities1(target,
|
55
55
|
refs.first.at(ns("./locality/@type")).text,
|
56
56
|
l10n(ret[1..-1].join), nil, node, @lang)
|
@@ -114,14 +114,18 @@ module IsoDoc
|
|
114
114
|
added.each { |a| m << a }
|
115
115
|
next if i == refs.size - 1
|
116
116
|
|
117
|
-
m <<
|
118
|
-
r.next_element["connective"]
|
119
|
-
else locality_delimiter(r)
|
120
|
-
end
|
117
|
+
m << eref_locality_delimiter(r)
|
121
118
|
end
|
122
119
|
ret.empty? ? ret : [", "] + ret
|
123
120
|
end
|
124
121
|
|
122
|
+
def eref_locality_delimiter(ref)
|
123
|
+
if ref&.next_element&.name == "localityStack"
|
124
|
+
ref.next_element["connective"]
|
125
|
+
else locality_delimiter(ref)
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
125
129
|
def eref_locality_stack(ref, idx, target, node)
|
126
130
|
ret = []
|
127
131
|
if ref.name == "localityStack"
|
data/lib/isodoc/version.rb
CHANGED
@@ -233,7 +233,7 @@ module IsoDoc
|
|
233
233
|
end
|
234
234
|
|
235
235
|
def suffix_url(url)
|
236
|
-
return url if url.nil? || %r{^https
|
236
|
+
return url if url.nil? || %r{^https?://|^#}.match?(url)
|
237
237
|
return url unless File.extname(url).empty?
|
238
238
|
|
239
239
|
url.sub(/#{File.extname(url)}$/, ".doc")
|
data/spec/isodoc/inline_spec.rb
CHANGED
@@ -2208,7 +2208,7 @@ RSpec.describe IsoDoc do
|
|
2208
2208
|
output = <<~OUTPUT
|
2209
2209
|
<itu-standard xmlns='https://www.calconnect.org/standards/itu' type='presentation'>
|
2210
2210
|
<p id='_'>
|
2211
|
-
<eref type='inline' bibitemid='ref1' citeas='XYZ'
|
2211
|
+
<eref type='inline' bibitemid='ref1' citeas='XYZ'>
|
2212
2212
|
<localityStack connective='from'>
|
2213
2213
|
<locality type='clause'>
|
2214
2214
|
<referenceFrom>3</referenceFrom>
|
@@ -2239,7 +2239,7 @@ RSpec.describe IsoDoc do
|
|
2239
2239
|
</eref>
|
2240
2240
|
text
|
2241
2241
|
</p>
|
2242
|
-
<eref type='inline' bibitemid='ref1' citeas='XYZ'
|
2242
|
+
<eref type='inline' bibitemid='ref1' citeas='XYZ'>
|
2243
2243
|
<localityStack connective='and'>
|
2244
2244
|
<locality type='clause'>
|
2245
2245
|
<referenceFrom>3</referenceFrom>
|
@@ -2252,7 +2252,7 @@ RSpec.describe IsoDoc do
|
|
2252
2252
|
</localityStack>
|
2253
2253
|
XYZ, Clause 3 and 5
|
2254
2254
|
</eref>
|
2255
|
-
<eref type='inline' bibitemid='ref1' citeas='XYZ'
|
2255
|
+
<eref type='inline' bibitemid='ref1' citeas='XYZ'>
|
2256
2256
|
<localityStack connective='and'>
|
2257
2257
|
<locality type='clause'>
|
2258
2258
|
<referenceFrom>3</referenceFrom>
|
@@ -2296,7 +2296,7 @@ RSpec.describe IsoDoc do
|
|
2296
2296
|
</localityStack>
|
2297
2297
|
text
|
2298
2298
|
</eref>
|
2299
|
-
<eref type='inline' bibitemid='ref1' citeas='XYZ'
|
2299
|
+
<eref type='inline' bibitemid='ref1' citeas='XYZ'>
|
2300
2300
|
<localityStack connective='from'>
|
2301
2301
|
<locality type='clause'>
|
2302
2302
|
<referenceFrom>3</referenceFrom>
|