relaton-render 3.0.0.pre.alpha.39 → 3.0.0.pre.alpha.40
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e1cdb48d9084de905d6277fba23cafe3d8d3c31f32211c0a51855f42e06490a6
|
|
4
|
+
data.tar.gz: bf2084c1341a243bbe3220c122b52b8a61660e1e8bf46d22797a908122e50839
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3bcc088f836cee4ef783e826b505ab6f88b40a2309d6dc1dc5e69be7c8754c4f3986ba3349fbcd45404a4708cba090e0347dfe9534d413ce54c10b3c75939bda
|
|
7
|
+
data.tar.gz: 58ec385cf5ee1ca3013015a5043c8db77caa14d7ae06eb3d722e39755aea9e991ac639ac132ce1a4e48f471737dba44d99f045233dfc5527ca172ba40b19e01e
|
|
@@ -56,7 +56,9 @@ module Relaton
|
|
|
56
56
|
if model.respond_to?(:formattedref) && model.formattedref
|
|
57
57
|
model.formattedref.content
|
|
58
58
|
else
|
|
59
|
-
|
|
59
|
+
# a collection's items may each declare their own language;
|
|
60
|
+
# the single-item render routes like render_all does
|
|
61
|
+
renderer_for(Array(model.language).first).render(model, **opts)
|
|
60
62
|
end
|
|
61
63
|
embedded ? text : "<formattedref>#{text}</formattedref>"
|
|
62
64
|
end
|
|
@@ -38,8 +38,15 @@ module Relaton
|
|
|
38
38
|
if d.from && d.to
|
|
39
39
|
fy = d.from.to_date.year
|
|
40
40
|
ty = d.to.to_date.year
|
|
41
|
-
fy == ty ? fy.to_s : "#{fy}#{dash}#{ty}"
|
|
42
|
-
|
|
41
|
+
return (fy == ty ? fy.to_s : "#{fy}#{dash}#{ty}")
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# A from-only date is an open run ("1925–") for a
|
|
45
|
+
# continuing resource; a monograph's publication date
|
|
46
|
+
# cites the year bare ("2022") — the trailing dash would
|
|
47
|
+
# leak into the terminator otherwise
|
|
48
|
+
if d.from && %w[continuing serial_part online webdoc]
|
|
49
|
+
.include?(item_kind)
|
|
43
50
|
"#{d.from.to_date.year}#{dash}"
|
|
44
51
|
end
|
|
45
52
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: relaton-render
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.0.0.pre.alpha.
|
|
4
|
+
version: 3.0.0.pre.alpha.40
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-10-
|
|
11
|
+
date: 2026-10-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: htmlentities
|