Convert every #hashtag
to a link.
Helpful when writing docs in markdown.
$ npm install markdown-code-hashtags
const hashtags = require('markdown-code-hashtags');
hashtags(
'Look! A `#hashtag`!'
);
//» 'Look! A [`#hashtag`](#hashtag)!'
You can also configure the thing:
const hashtags = require('markdown-code-hashtags').custom;
hashtags({hash: '@', swallow: true, urlBase: '/custom/'},
'Got a different `@link` here.'
);
//» 'Got a different [`link`](/custom/link) here.'
- erase – Remove part of a markdown/HTML document.