anystyle-parser 0.7.0 → 0.7.1

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
  SHA1:
3
- metadata.gz: a03b039b49127a9f73d1e44b0bdb75472072e0ee
4
- data.tar.gz: c64e2c240e9931c9ffea84571b2ca7d26a66fd91
3
+ metadata.gz: 427440daed597161edb2274af463b42075111354
4
+ data.tar.gz: 9e4112dc26207ff8129dc569f774c1e246dd7363
5
5
  SHA512:
6
- metadata.gz: 0c35334987526b3ed84855a90c0b39edd0bcccdff4550971eaf312d618f908e83573b36880fbafc661dcb4b1ca2ccc3594cae02461d03daec58f2bb040339b03
7
- data.tar.gz: 567befd97bda4209ae913efac073a6368d564be2285eb9c746ad221e29eea7fc406cbb07835479dd0f89344069b93568f8618f0fdddf02e1d06fc6955849dbaa
6
+ metadata.gz: d7b18fac77a6b794d769caadc09f4ab065e5b5d3b48f21763c107c18e9a6fab5bf117a8e8974c0371ea8748912ebdb54865a5a9afa868c5a5672442a822361c3
7
+ data.tar.gz: 0810011ff502dded035151618229627d3186f357df36a1b220cd7b7cd5430d4126171813f5094678b78f38aae724258b157d15e2e0fdc6b8bc8cdd6df7fcd727
@@ -193,9 +193,11 @@ module Anystyle
193
193
  def localize(hash)
194
194
  return hash if hash.has_key?(:language)
195
195
 
196
- hash[:language] = Parser.language(
197
- hash.values_at(:title, :booktitle, :location, :publisher).join(' ')
198
- )
196
+ text = hash.values_at(
197
+ :title, :booktitle, :location, :publisher
198
+ ).compact.join(' ')
199
+
200
+ hash[:language] = Parser.language(text) unless text.empty?
199
201
 
200
202
  hash
201
203
  end
@@ -1,5 +1,5 @@
1
1
  module Anystyle
2
2
  module Parser
3
- VERSION = '0.7.0'.freeze
3
+ VERSION = '0.7.1'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: anystyle-parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sylvester Keil