mirror of
https://github.com/multipleof4/lynchmark.git
synced 2026-01-14 16:47:55 +00:00
6 lines
228 B
JavaScript
6 lines
228 B
JavaScript
async function parseMarkdown(md){
|
|
const{marked}=await import('https://esm.sh/marked');
|
|
const{DOMPurify}=await import('https://esm.sh/dompurify');
|
|
return DOMPurify.sanitize(marked.parse(md));
|
|
}
|
|
export default parseMarkdown; |