mirror of
https://github.com/multipleof4/lynchmark.git
synced 2026-01-14 16:47:55 +00:00
9 lines
221 B
JavaScript
9 lines
221 B
JavaScript
const parseMarkdown = async m => {
|
|
try {
|
|
const {marked} = await import('https://esm.sh/marked');
|
|
return marked.parse(m);
|
|
} catch (e) {
|
|
return `<pre>${e.message}</pre>`;
|
|
}
|
|
};
|
|
export default parseMarkdown; |