mirror of
https://github.com/multipleof4/lynchmark.git
synced 2026-01-13 16:17:54 +00:00
11 lines
322 B
JavaScript
11 lines
322 B
JavaScript
const parseMarkdown = async (md) => {
|
|
const [{ marked }, { default: sanitize }] = await Promise.all([
|
|
import('https://esm.sh/marked'),
|
|
import('https://esm.sh/dompurify')
|
|
]);
|
|
|
|
return sanitize.sanitize(marked.parse(md));
|
|
};
|
|
export default parseMarkdown;
|
|
// Generation time: 7.966s
|
|
// Result: PASS
|