mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-10 15:13:04 -04:00
fix markdown issue
This commit is contained in:
parent
9f18d4814f
commit
1362395228
1 changed files with 16 additions and 16 deletions
|
@ -5,13 +5,13 @@ module.exports.icon = function(icon){
|
|||
return REDESIGN_ICONS[icon].replace(/:[a-z1-9_]*:/, ':i:')
|
||||
}
|
||||
|
||||
module.exports.highlight = function(content){
|
||||
return "`" + content.replace(/\`/g, 'ˋ') + "`"
|
||||
module.exports.highlight = function(content = ""){
|
||||
return "`" + content.toString().replace(/\`/g, 'ˋ') + "`"
|
||||
}
|
||||
|
||||
module.exports.codeblock = function(type, content){
|
||||
module.exports.codeblock = function(type, content = ""){
|
||||
if(!content.length) return "```" + type + "\n```"
|
||||
return "```" + type + "\n" + content.join('\n').replace(/\`/g, '`') + "\n```"
|
||||
return "```" + type + "\n" + content.toString().join('\n').replace(/\`/g, '`') + "\n```"
|
||||
}
|
||||
|
||||
module.exports.link = function(url, masked, tooltip = ""){
|
||||
|
@ -24,33 +24,33 @@ module.exports.timestamp = function(time, flag = "t"){
|
|||
return `<t:${Math.floor(time/1000)}:${flag}>`
|
||||
}
|
||||
|
||||
module.exports.pill = function(content){
|
||||
return " **` " + content.replace(/\`/g, 'ˋ') + " `**"
|
||||
module.exports.pill = function(content = ""){
|
||||
return " **` " + content.toString().replace(/\`/g, 'ˋ') + " `**"
|
||||
}
|
||||
|
||||
module.exports.smallPill = function(content){
|
||||
return " ` " + content.replace(/\`/g, 'ˋ') + " `"
|
||||
module.exports.smallPill = function(content = ""){
|
||||
return " ` " + content.toString().replace(/\`/g, 'ˋ') + " `"
|
||||
}
|
||||
|
||||
module.exports.iconPill = function(icon, content){
|
||||
module.exports.iconPill = function(icon, content = ""){
|
||||
if(!REDESIGN_ICONS[icon]) icon = "question"
|
||||
return REDESIGN_ICONS[icon].replace(/:[a-z1-9_]*:/, ':i:') + " **` " + content.replace(/\`/g, 'ˋ') + " `**"
|
||||
return REDESIGN_ICONS[icon].replace(/:[a-z1-9_]*:/, ':i:') + " **` " + content.toString().replace(/\`/g, 'ˋ') + " `**"
|
||||
}
|
||||
|
||||
module.exports.smallIconPill = function(icon, content){
|
||||
module.exports.smallIconPill = function(icon, content = ""){
|
||||
if(!REDESIGN_ICONS[icon]) icon = "question"
|
||||
return REDESIGN_ICONS[icon].replace(/:[a-z1-9_]*:/, ':i:') + " ` " + content.replace(/\`/g, 'ˋ') + " `"
|
||||
return REDESIGN_ICONS[icon].replace(/:[a-z1-9_]*:/, ':i:') + " ` " + content.toString().replace(/\`/g, 'ˋ') + " `"
|
||||
}
|
||||
|
||||
module.exports.iconLinkPill = function(icon, url, content, tooltip = ""){
|
||||
module.exports.iconLinkPill = function(icon, url, content = "", tooltip = ""){
|
||||
if(!REDESIGN_ICONS[icon]) icon = "question"
|
||||
if(tooltip.length) tooltip = ` '${tooltip}'`
|
||||
if(content) return `${REDESIGN_ICONS[icon].replace(/:[a-z1-9_]*:/, ':i:')} [**\` ${content.replace(/\`/g, 'ˋ')} \`**](${url}${tooltip})`
|
||||
if(content) return `${REDESIGN_ICONS[icon].replace(/:[a-z1-9_]*:/, ':i:')} [**\` ${content.toString().replace(/\`/g, 'ˋ')} \`**](${url}${tooltip})`
|
||||
return url
|
||||
}
|
||||
module.exports.linkPill = function(url, content, tooltip = ""){
|
||||
module.exports.linkPill = function(url, content = "", tooltip = ""){
|
||||
if(tooltip.length) tooltip = ` '${tooltip}'`
|
||||
if(content) return `[**\` ${content.replace(/\`/g, 'ˋ')} \`**](${url}${tooltip})`
|
||||
if(content) return `[**\` ${content.toString().replace(/\`/g, 'ˋ')} \`**](${url}${tooltip})`
|
||||
return url
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue