Trailing letters in DOIs weren't linked in HTML bibliographies

This commit is contained in:
Dan Stillman 2009-07-14 05:36:37 +00:00
parent 882074e847
commit 9c8738dca0

View file

@ -413,7 +413,7 @@ Zotero.CSL.prototype.formatBibliography = function(itemSet, format) {
//
// Ignore URLs preceded by '>', since these are likely already links
string = string.replace(/([^>])(https?:\/\/[^\s]+)([\."'>:\]\)\s])/g, '$1<a href="$2">$2</a>$3');
string = string.replace(/(doi:[ ]*)([0-9][^\s]+[0-9])/g, '$1<a href="http://dx.doi.org/$2">$2</a>');
string = string.replace(/(doi:[ ]*)(10\.[^\s]+[0-9a-zA-Z])/g, '$1<a href="http://dx.doi.org/$2">$2</a>');
var span = (coins ? ' <span class="Z3988" title="'+coins.replace("&", "&amp;", "g")+'">&nbsp;</span>' : '');