How to use the markdown-it.default function in markdown-it

To help you get started, we’ve selected a few markdown-it 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 elastic / kibana / x-pack / legacy / plugins / actions / server / builtin_action_types / lib / send_email.ts View on Github external
function htmlFromMarkdown(services: Services, markdown: string) {
  try {
    const md = MarkdownIt({
      linkify: true,
    });

    return md.render(markdown);
  } catch (err) {
    services.log(['debug', 'actions'], `error rendering markdown to html: ${err.message}`);

    return markdown;
  }
}