Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const toHTML = (source, plugins, options) => core(plugins)
.process(source, { ...options, render: renderNodes }).html;
const toAST = (source, plugins, options) => core(plugins)
.process(source, {
...options,
render: input => html.render(input, { stripTags: true }),
}).tree;