fixes for wolfram sources

This commit is contained in:
derpystuff 2023-07-05 15:55:25 +02:00
parent b54d99de2e
commit 07893bba18
2 changed files with 10 additions and 9 deletions

View file

@ -42,7 +42,10 @@ module.exports.citation = function(number = 1, url, tooltip = ""){
let formatted = "";
for(const n of number.toString().split('')) formatted += SUPERSCRIPT_NUMBERS[parseInt(n)]
if(url){
if(tooltip.length) tooltip = ` '${tooltip}'`
if(tooltip.length){
if(tooltip.endsWith(' ')) tooltip = tooltip.substr(0, tooltip.length - 1)
tooltip = ` '${tooltip.replace(/["*]/g, '')}'`
}
return `[⁽${formatted}⁾](${url}${tooltip})`
}
return `${formatted}`