relaton-bib 1.11.4 → 1.11.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -1
- data/lib/relaton_bib/bibxml_parser.rb +1 -1
- data/lib/relaton_bib/localized_string.rb +1 -5
- data/lib/relaton_bib/version.rb +1 -1
- data/lib/relaton_bib/xml_parser.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4879a622c8f133828b75abffc19166c9bc8047d9ecff25bbcd7b8cdc472acde4
|
4
|
+
data.tar.gz: 27b37f70ddf22ded981996ac98ae58b284b99790ff0d1bb96a55c100fc08a850
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46fdb1f657ae745e28ac3e4b11fa17b4bd42a75fef5c9aca29b7834796df6f75bdff1f73ef81222784f9dae07ea200a821d8d3ad10d754f5ee75eebded5e8fd1
|
7
|
+
data.tar.gz: 4a86ff51080029116ce9a0745f8411442fa6ce8da5a89b278a3a0dc38ffd4368fc36b516d9ea631662e74fc3704284889dfa1af758dba209520371824fe6321f
|
data/.rubocop.yml
CHANGED
@@ -194,7 +194,7 @@ module RelatonBib
|
|
194
194
|
# @return [Array<RelatonBib::FormattedString>]
|
195
195
|
def abstracts(ref)
|
196
196
|
ref.xpath("./front/abstract").map do |a|
|
197
|
-
c = a.
|
197
|
+
c = a.inner_html.gsub(/\s*(<\/?)t(>)\s*/, '\1p\2')
|
198
198
|
.gsub(/[\t\n]/, " ").squeeze " "
|
199
199
|
FormattedString.new(content: c, language: language(ref), script: "Latn",
|
200
200
|
format: "text/html")
|
@@ -56,14 +56,10 @@ module RelatonBib
|
|
56
56
|
else
|
57
57
|
builder.parent["language"] = language.join(",") if language&.any?
|
58
58
|
builder.parent["script"] = script.join(",") if script&.any?
|
59
|
-
builder.
|
59
|
+
builder.text content
|
60
60
|
end
|
61
61
|
end
|
62
62
|
|
63
|
-
def escaped_content
|
64
|
-
content.encode("UTF-8") # .gsub(/&/, "&").gsub(/"/, """).gsub(/'/, "'")
|
65
|
-
end
|
66
|
-
|
67
63
|
# @return [Hash]
|
68
64
|
def to_hash # rubocop:disable Metrics/AbcSize,Metrics/CyclomaticComplexity,Metrics/PerceivedComplexity
|
69
65
|
if content.is_a? String
|
data/lib/relaton_bib/version.rb
CHANGED
@@ -354,7 +354,7 @@ module RelatonBib
|
|
354
354
|
# @return [Array<RelatonBib::FormattedString>]
|
355
355
|
def fetch_abstract(item)
|
356
356
|
item.xpath("./abstract").map do |a|
|
357
|
-
c = a.children.to_s
|
357
|
+
c = a.text.strip # children.to_s
|
358
358
|
FormattedString.new(content: c, language: a[:language],
|
359
359
|
script: a[:script], format: a[:format])
|
360
360
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-bib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.11.
|
4
|
+
version: 1.11.5
|
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-05-
|
11
|
+
date: 2022-05-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: byebug
|