isodoc 2.0.5.1 → 2.0.5.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7eac37329d91f52ffb48b04b35a58e9d5966ba1ef79492c7e1fd14f77490b81a
4
- data.tar.gz: e4e1fffbadb350529b5b8bcc4e3f8b13604fd9ceb982d935da33f61722ab1984
3
+ metadata.gz: '099aeb3456fabbcbd95076b6ccb9826997871b9d85ff079fc04aadf82a491a80'
4
+ data.tar.gz: 4002cee22c77b7a64f69864f3a67990cdfedddd458f95e86921ff132a804fe10
5
5
  SHA512:
6
- metadata.gz: 7f64dbf601952d1e7141ddca015d6fe61e989efd1d751ee9e42575a78e818a3551c4cbb26f5890dc53a1a50c1e75c02deca03e26c64b3568e1f49b76985027c0
7
- data.tar.gz: fe336da69b2efe89d21299708b62f968109f4ff7be2973cdd6d4f92e56616ff79ee71c024a222794dfdabb7d67b8b50b7d7065f448704d6383f93639846fea20
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["droploc"] = droploc
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 << if r&.next_element&.name == "localityStack"
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"
@@ -1,3 +1,3 @@
1
1
  module IsoDoc
2
- VERSION = "2.0.5.1".freeze
2
+ VERSION = "2.0.5.2".freeze
3
3
  end
@@ -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?://}.match?(url)
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")
@@ -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' droploc=''>
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' droploc=''>
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' droploc=''>
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' droploc=''>
2299
+ <eref type='inline' bibitemid='ref1' citeas='XYZ'>
2300
2300
  <localityStack connective='from'>
2301
2301
  <locality type='clause'>
2302
2302
  <referenceFrom>3</referenceFrom>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: isodoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.5.1
4
+ version: 2.0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.