Fixed bug when number has , on scholar citations

This commit is contained in:
George 2024-02-13 13:56:13 -03:00 committed by GitHub
parent a0bcaaf13f
commit b4e423286b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -46,7 +46,7 @@ module Jekyll
matches = cited_by_text.match(/Cited by (\d+[,\d]*)/)
if matches
citation_count = matches[1].to_i
citation_count = matches[1].sub(",", "").to_i
end
elsif !og_description_meta.empty?
@ -54,7 +54,7 @@ module Jekyll
matches = cited_by_text.match(/Cited by (\d+[,\d]*)/)
if matches
citation_count = matches[1].to_i
citation_count = matches[1].sub(",", "").to_i
end
end
@ -75,4 +75,4 @@ module Jekyll
end
end
Liquid::Template.register_tag('google_scholar_citations', Jekyll::GoogleScholarCitationsTag)
Liquid::Template.register_tag('google_scholar_citations', Jekyll::GoogleScholarCitationsTag)