remove-markdown
remove-markdown copied to clipboard
Replace inline link with its text, a separator and its link
This PR adds the possibility to replace inline links with text and link.
It adds a new option separateLinksAndTexts which is null by default, and is the separator between text and link.
it('should replace inline link with text and link, with separator', function () {
const string = 'some [inline link](http://www.test.net/).';
const expected = 'some inline link: http://www.test.net/.';
expect(removeMd(string, { separateLinksAndTexts: ': ' })).to.equal(expected);
});