relaton-render 0.4.3 → 0.4.4
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e355ba215a67c891399708f72baabeba37cddfc01a43df6d722c0a1aa769878
|
4
|
+
data.tar.gz: cdc21aa38ecdadab907db21b1b0cf58b8ce1f2ebc7966be7a894b4f58ffc3919
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f52456f0d7708e911a731fb6f584aed61cced226ed4f7a5de54407b0563ccaa5e5d182472cc0d01d2a59e13d1955910b8cfed1fd601d79ac88745ec6cab45743
|
7
|
+
data.tar.gz: aeb47b97f4146f90bdc86a3e2b5637e35675c67e37bb79b49010a450d34adcfb5c2792b3334ecedf8ff2749bc3511afaeb42442cf35eb8ef840f56d2599f654c
|
data/README.adoc
CHANGED
@@ -191,6 +191,7 @@ The Liquid template surrounds each field by preceding and following punctuation.
|
|
191
191
|
* Underscore is escaped by \. So `<span_class="std\_note">` maps to `<span class="std_note">`.
|
192
192
|
* If punctuation is space delimited, it is inserted regardless of preceding content. So `{{ creatornames }} ({{date}}) .` will insert the full stop whether or not the date is present.
|
193
193
|
* Space between punctuation and before punctuation is automatically removed.
|
194
|
+
* Spaces within fields are globally converted to underscores. For that reason, any filter operations in Liquid need to refer to underscore instead of space.
|
194
195
|
|
195
196
|
For example:
|
196
197
|
|
@@ -23,7 +23,7 @@ module Relaton
|
|
23
23
|
.compact.map { |x| x.sub(/(.)\.?$/, "\\1.") }
|
24
24
|
forenames.empty? and initials.empty? and return [nil, nil, nil]
|
25
25
|
initials.empty? and initials = forenames.map { |x| "#{x[0]}." }
|
26
|
-
[forenames.first, forenames[1..-1], initials]
|
26
|
+
[forenames.first, forenames[1..-1], Array(initials)]
|
27
27
|
end
|
28
28
|
|
29
29
|
def extractname(contributor)
|
@@ -56,9 +56,10 @@ module Relaton
|
|
56
56
|
def series_title(series, _doc)
|
57
57
|
return nil if series.nil?
|
58
58
|
|
59
|
-
series.title.respond_to?(:titles) and
|
59
|
+
series.title.respond_to?(:titles) && !series.title.titles.empty? and
|
60
60
|
return series.title.titles.first.title.content
|
61
|
-
series.title
|
61
|
+
series.title.respond_to?(:title) and return series.title.title&.content
|
62
|
+
series.title.respond_to?(:formattedref) and series.formattedref.content
|
62
63
|
end
|
63
64
|
|
64
65
|
def series_formatted(series, _doc)
|
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: 0.4.
|
4
|
+
version: 0.4.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-08-
|
11
|
+
date: 2022-08-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|