mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-09 14:43:05 -04:00
fix markdown link for citations
This commit is contained in:
parent
29d7e91c98
commit
b8db606fe8
1 changed files with 2 additions and 1 deletions
|
@ -64,6 +64,7 @@ module.exports.iconLinkPill = function(icon, url, content = "", tooltip = ""){
|
|||
if(content) return `${ICONS[icon].replace(/:[a-z1-9_]*:/, ':i:')} [**\` ${content.toString().replace(/\`/g, 'ˋ')} \`**](${url.replace(/\)/g, '\\)')}${tooltip})`
|
||||
return url
|
||||
}
|
||||
|
||||
module.exports.linkPill = function(url, content = "", tooltip = ""){
|
||||
if(tooltip.length) tooltip = ` '${tooltip}'`
|
||||
if(content) return `[**\` ${content.toString().replace(/\`/g, 'ˋ')} \`**](${url.replace(/\)/g, '\\)')}${tooltip})`
|
||||
|
@ -79,7 +80,7 @@ module.exports.citation = function(number = 1, url, tooltip = ""){
|
|||
if(tooltip.endsWith(' ')) tooltip = tooltip.substr(0, tooltip.length - 1)
|
||||
tooltip = ` '${tooltip.replace(/["*]/g, '')}'`
|
||||
}
|
||||
return `[⁽${formatted}⁾](${url}${tooltip})`
|
||||
return `[⁽${formatted}⁾](${url.replace(/\)/g, '\\)')}${tooltip})`
|
||||
}
|
||||
return `⁽${formatted}⁾`
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue