Closed aiavci closed 1 year ago
Hi @aiavci, turndown doesn't support Slack Markdown by default, but you can extend it to add support with rules: https://github.com/mixmark-io/turndown#extending-with-rules.
In case anyone else is searching for it, here's what I did to use Slack's link format instead of regular Markdown
// Markdown [text](href)
// Slack <href|text>
turndownService.addRule('slackLinks', {
filter: ['a'],
replacement(text, { href }) {
return `<${href}|${text}>`;
},
});
Also, Slack requires absolute URLs. Relative links are not allowed.
Slack's markdown format is a bit different. Would this project have support for it?