Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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;
}
}