lib/bolognese/utils.rb in bolognese-0.9.19 vs lib/bolognese/utils.rb in bolognese-0.9.20
- old
+ new
@@ -211,10 +211,10 @@
def find_from_format_by_id(id)
id = normalize_id(id)
if /\A(?:(http|https):\/(\/)?(dx\.)?doi.org\/)?(doi:)?(10\.\d{4,5}\/.+)\z/.match(id)
ra = get_doi_ra(id)
- ra.present? ? ra.downcase : nil
+ %w(DataCite Crossref).include?(ra) ? ra.downcase : nil
elsif /\A(?:(http|https):\/(\/)?orcid\.org\/)?(\d{4}-\d{4}-\d{4}-\d{3}[0-9X]+)\z/.match(id)
"orcid"
elsif /\A(http|https):\/(\/)?github\.com\/(.+)\z/.match(id)
"codemeta"
else