masked link tooltips

This commit is contained in:
derpystuff 2022-06-11 22:12:44 +02:00
parent 90f4b87832
commit 0d3b8ce64e
2 changed files with 7 additions and 8 deletions

View file

@ -13,8 +13,9 @@ module.exports.codeblock = function(type, content){
return "```" + type + "\n" + content.join('\n') + "\n```"
}
module.exports.link = function(url, masked){
if(masked) return `[${masked}](${url})`
module.exports.link = function(url, masked, tooltip = ""){
if(tooltip.length) tooltip = ` '${tooltip}'`
if(masked) return `[${masked}](${url}${tooltip})`
return url
}