How to use the dmd/helpers/ddata._link function in dmd

To help you get started, we’ve selected a few dmd examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github apifytech / apify-js / website / tools / helpers.js View on Github external
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})`);
        });
    }