@atlassian-partner-engineering/bitbucket-html-to-slack

const convert = require('bitbucket-html-to-slack') const html = 'external link' convert(html)

Usage no npm install needed!

<script type="module">
  import atlassianPartnerEngineeringBitbucketHtmlToSlack from 'https://cdn.skypack.dev/@atlassian-partner-engineering/bitbucket-html-to-slack';
</script>

README

bitbucket-html-to-slack

Usage

const convert = require('bitbucket-html-to-slack')
const html = '<p>external <a data-is-external-link="true" href="http://example.com" rel="nofollow">link</a></p>'
convert(html)

Test

npm test

Some symbols are escaped by zero-width-space, so be careful when edit __tests__/fixtures/.

To copy zer-width-whitespace into your clipboard use copy(String.fromCharCode(0x200B)) in Chrome Developers console.