diff --git a/commands/message/info/appinfo.js b/commands/message/info/appinfo.js index ed313a6..0406dc0 100644 --- a/commands/message/info/appinfo.js +++ b/commands/message/info/appinfo.js @@ -101,9 +101,10 @@ module.exports = { } if(application.tags){ + console.log(application.tags) embed.fields.push({ name: `${icon("list")} Tags`, - value: application.tags.map(t => highlight(t)).join(', '), + value: application.tags.map(t => highlight(t + '​')).join(', '), inline: true }) } diff --git a/labscore/utils/markdown.js b/labscore/utils/markdown.js index fbeb62a..4e513f3 100644 --- a/labscore/utils/markdown.js +++ b/labscore/utils/markdown.js @@ -6,12 +6,12 @@ module.exports.icon = function(icon){ } module.exports.highlight = function(content){ - return "`" + content.replace(/`/g, 'ˋ') + "`" + return "`" + content.replace(/\`/g, 'ˋ') + "`" } 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.join('\n').replace(/\`/g, '`​') + "\n```" } module.exports.link = function(url, masked, tooltip = ""){ @@ -25,32 +25,32 @@ module.exports.timestamp = function(time, flag = "t"){ } module.exports.pill = function(content){ - return " **` " + content.replace(/`/g, 'ˋ') + " `**" + return " **` " + content.replace(/\`/g, 'ˋ') + " `**" } module.exports.smallPill = function(content){ - return " ` " + content.replace(/`/g, 'ˋ') + " `" + return " ` " + content.replace(/\`/g, 'ˋ') + " `" } 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.replace(/\`/g, 'ˋ') + " `**" } 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.replace(/\`/g, 'ˋ') + " `" } 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.replace(/\`/g, 'ˋ')} \`**](${url}${tooltip})` return url } module.exports.linkPill = function(url, content, tooltip = ""){ if(tooltip.length) tooltip = ` '${tooltip}'` - if(content) return `[**\` ${content.replace(/`/g, 'ˋ')} \`**](${url}${tooltip})` + if(content) return `[**\` ${content.replace(/\`/g, 'ˋ')} \`**](${url}${tooltip})` return url }