Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
links.forEach((link) => {
const linked = ddata._link(link.url, options);
if (link.caption === link.url) link.caption = linked.name;
if (linked.url) link.url = linked.url;
const url = link.url.includes('+') ? link.url : link.url.toLowerCase();
text = text.replace(link.original, `[\`${link.caption}\`](${url})`);
});
}