mirror of
https://github.com/lynchmarkHQ/lynchmark.com.git
synced 2026-10-16 16:57:53 +00:00
9 lines
287 B
JavaScript
9 lines
287 B
JavaScript
const parseMarkdown = async t => {
|
|
const u = 'https://esm.sh/',
|
|
[{ parse }, { default: d }] = await Promise.all([
|
|
import(u + 'marked@12.0.1'),
|
|
import(u + 'dompurify@3.0.9')
|
|
])
|
|
return d(self).sanitize(parse(t ?? ''))
|
|
}
|
|
export default parseMarkdown; |