Fixed bug when number has , on scholar citations
This commit is contained in:
parent
a0bcaaf13f
commit
b4e423286b
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue