relaton-bib 1.9.8 → 1.9.9

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: cea4f63e62a2c6abff013361c4851294799cee45bcbe44a52ee8158501505f5f
4
- data.tar.gz: 1d973d98047232ff7167257beafc0ed339177b27eb878918d9bcf0cc8f7d7301
3
+ metadata.gz: 9a8c1388ea0a59ee8113bae219cb62549b4c7dfbb991562e47d38f528c3bf746
4
+ data.tar.gz: 9a8b95cb8aab6d5f221b24ff2610ff41f527753dde7e96376bcd63eccaa76513
5
5
  SHA512:
6
- metadata.gz: e21ef90933920055d91d952e2b5513279d4dd61559ead7aebef9db0d7df4b15283bdd5d2cf77decb16d4e4f8d573f38c4c872582dfcdfbd0899703e4b8a9b152
7
- data.tar.gz: 471d57586461900b6805df5c8d536591a2d0377e3da455af5708dbfa37aa13a4960bdee00f7c54de052763332de81b31f862dc9b4acc21a9992c3c52eba08d7a
6
+ metadata.gz: c2c4dfd95dca899ce8c2d10b8e31190267703628224eaaba815a9c47316aab420dcd769c33ee569d8f2eaa7dbf0257f9639ae31e8ea10252ee63eab4201cd422
7
+ data.tar.gz: a398ae617cf916c2ad95ce8aff8a5701834817f0694c9e51d0d2f260cd77355f9ee0b1135de50648431f5170d03ee7f1ae7765fb0fd5519ce0c63af62b603b9b
@@ -139,10 +139,9 @@ module RelatonBib
139
139
  # @return [Array<RelatonBib::FormattedString>]
140
140
  def abstracts(ref)
141
141
  ref.xpath("./front/abstract").map do |a|
142
- FormattedString.new(
143
- content: a.children.to_s.gsub(/(<\/?)t(>)/, '\1p\2'),
144
- language: language(ref), script: "Latn", format: "text/html"
145
- )
142
+ c = a.children.to_s.gsub(/\s+(<\/?)t(>)\s+/, '\1p\2').gsub(/\n/, "").squeeze " "
143
+ FormattedString.new(content: c, language: language(ref), script: "Latn",
144
+ format: "text/html")
146
145
  end
147
146
  end
148
147
 
@@ -189,8 +189,8 @@ module RelatonBib
189
189
  # @option opts [String, Symbol] :lang language
190
190
  def to_xml(**opts)
191
191
  opts[:builder].person do |builder|
192
- name.to_xml **opts
193
- affiliation.each { |a| a.to_xml **opts }
192
+ name.to_xml(**opts)
193
+ affiliation.each { |a| a.to_xml(**opts) }
194
194
  identifier.each { |id| id.to_xml builder }
195
195
  contact.each { |contact| contact.to_xml builder }
196
196
  end
@@ -210,7 +210,7 @@ module RelatonBib
210
210
  # @count [Integer] number of persons
211
211
  # @return [String]
212
212
  def to_asciibib(prefix = "", count = 1) # rubocop:disable Metrics/AbcSize
213
- pref = prefix.sub /\*$/, "person"
213
+ pref = prefix.sub(/\*$/, "person")
214
214
  out = count > 1 ? "#{pref}::\n" : ""
215
215
  out += name.to_asciibib pref
216
216
  affiliation.each { |af| out += af.to_asciibib pref, affiliation.size }
@@ -1,3 +1,3 @@
1
1
  module RelatonBib
2
- VERSION = "1.9.8".freeze
2
+ VERSION = "1.9.9".freeze
3
3
  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.9.8
4
+ version: 1.9.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-12-19 00:00:00.000000000 Z
11
+ date: 2021-12-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: byebug