remove-markdown icon indicating copy to clipboard operation
remove-markdown copied to clipboard

Replace inline link with its text, a separator and its link

Open tafel opened this issue 3 months ago • 0 comments

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);
});

tafel avatar Nov 21 '25 07:11 tafel