Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const sanitizeMarkdown = (markdown: string) =>
githubToSlack(markdown)
.split('\n')
.map(line => {
// Strip out the ### prefix and replace it with ** to make it bold
if (line.startsWith('#')) {
return `*${line.replace(/^[#]+/, '')}*`;
}
return line;
})
.join('\n');