relaton-render 1.0.0 → 1.0.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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c5881b8b6067c4c4b679d7d7037ea9b3bb4537ad29c8b4d18f786e7f2a369cb7
|
|
4
|
+
data.tar.gz: 8f206ce02d52cd4a5781b8ddae109d540e18dcfe460264d5695c68a42a0fc642
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c2e5f22923975ff914f60dbb8f885bb71d23249f844f0e82e5bae0635a1792ac2f254ec5cedfae59feac9823bf837c65aedc80947bda0dbfce74f81815353c21
|
|
7
|
+
data.tar.gz: c38f524ec2a3fc25f39a8837dcdc4f56f2061f3e1d9457605cdfb18eb0017405de69bd9ca7ff4788a002a324e639b271f8dd4b4876c7e6b65f188ce3ec9c3719
|
|
@@ -248,7 +248,7 @@ module Relaton
|
|
|
248
248
|
def uriformat(uri)
|
|
249
249
|
uri.nil? || uri.empty? and return nil
|
|
250
250
|
# do not process uri contents in l10n
|
|
251
|
-
"<link target='#{uri}'><esc>#{uri}</esc></link>"
|
|
251
|
+
"<fmt-link target='#{uri}'><esc>#{uri}</esc></fmt-link>"
|
|
252
252
|
end
|
|
253
253
|
|
|
254
254
|
private
|
|
@@ -50,6 +50,7 @@ module Relaton
|
|
|
50
50
|
@dateklass = Relaton::Render::Date
|
|
51
51
|
@parseklass = Relaton::Render::Parse
|
|
52
52
|
@i18nklass = options["i18nklass"] || Relaton::Render::I18n
|
|
53
|
+
@citeklass = Relaton::Render::Citations
|
|
53
54
|
end
|
|
54
55
|
|
|
55
56
|
def root_initalize(opt)
|
|
@@ -75,7 +76,7 @@ module Relaton
|
|
|
75
76
|
default_i18n = opt["i18n"] ||
|
|
76
77
|
i18n_klass(language: @lang, script: @script, locale: @locale,
|
|
77
78
|
i18nhash: opt["i18nhash"])
|
|
78
|
-
@i18n = @i18nklass.new(opt.merge({"i18n" => default_i18n}))
|
|
79
|
+
@i18n = @i18nklass.new(opt.merge({ "i18n" => default_i18n }))
|
|
79
80
|
i18n_default_strs(opt)
|
|
80
81
|
end
|
|
81
82
|
|
|
@@ -147,7 +148,7 @@ module Relaton
|
|
|
147
148
|
def xml2relaton(bib)
|
|
148
149
|
bib.is_a?(Nokogiri::XML::Element) and
|
|
149
150
|
bib = bib.to_xml(encoding: "UTF-8", indent: 0,
|
|
150
|
-
|
|
151
|
+
save_with: Nokogiri::XML::Node::SaveOptions::AS_XML)
|
|
151
152
|
bib.is_a?(String) && Nokogiri::XML(bib).errors.empty? and
|
|
152
153
|
bib = RelatonBib::XMLParser.from_xml(bib) or bib
|
|
153
154
|
end
|
|
@@ -217,13 +218,13 @@ module Relaton
|
|
|
217
218
|
# enhance_data is skipped here, and is done in batch inside Citations
|
|
218
219
|
def render_all(bib, type: "author-date")
|
|
219
220
|
bib = sanitise_citations_input(bib) or return
|
|
220
|
-
|
|
221
|
-
|
|
221
|
+
@citeklass.new(type: type, renderer: citation_renderers,
|
|
222
|
+
i18n: @i18n, lang: @lang, script: @script)
|
|
222
223
|
.render(citations1(bib))
|
|
223
224
|
end
|
|
224
225
|
|
|
225
226
|
def citation_renderers
|
|
226
|
-
|
|
227
|
+
{ default: self }
|
|
227
228
|
end
|
|
228
229
|
|
|
229
230
|
def sanitise_citations_input(bib)
|
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: 1.0.
|
|
4
|
+
version: 1.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-11-
|
|
11
|
+
date: 2025-11-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|