Prevent duplicate listing of doi link and link (text, with href doi link)

This commit is contained in:
Dannon Baker
2020-02-12 09:55:56 -05:00
parent 4e5db8de11
commit f362c15d4c
@@ -155,9 +155,8 @@ export default {
doiUrl = `https://doi.org/${fields.doi}`;
ref += `[<a href="${doiUrl}" target="_blank">doi:${fields.doi}</a>]`;
}
const url = fields.url || doiUrl;
if (url) {
ref += `[<a href="${url}" target="_blank">Link</a>]`;
if (fields.url) {
ref += `[<a href="${fields.url}" target="_blank">Link</a>]`;
}
return convertLaTeX({ onError: (error, latex) => `{${stringifyLaTeX(latex)}}` }, ref);
},