From abfcb5a1256078eab4234bb7d47cca37e8cde5ae Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Fri, 29 Nov 2019 08:46:52 +0100 Subject: [PATCH] simplify url link in graphql --- app/graphql/types/doi_item.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/graphql/types/doi_item.rb b/app/graphql/types/doi_item.rb index 96a600c98..75a03ef88 100644 --- a/app/graphql/types/doi_item.rb +++ b/app/graphql/types/doi_item.rb @@ -70,13 +70,13 @@ def formatted_citation(style: nil, locale: nil) bibliography = cp.render :bibliography, id: normalize_doi(object.doi) url = object.doi unless /^https?:\/\//i.match?(object.doi) - url = "https://doi.org/#{object.doi}" + url = "https://doi.org/#{object.doi}" end - bibliography.first.gsub(url,doi_link(url)) + bibliography.first.gsub(url, doi_link(url)) end def doi_link(url) - " #{url} " + "#{url}" end def citeproc_hsh