mirror of
https://github.com/multipleof4/lynchmark.git
synced 2026-06-07 20:12:13 +00:00
12 lines
363 B
JavaScript
12 lines
363 B
JavaScript
export const parseMarkdown = async (markdown) => {
|
|
try {
|
|
const { marked } = await import('https://cdn.jsdelivr.net/npm/marked/lib/marked.esm.js');
|
|
return marked.parse(markdown || '');
|
|
} catch (error) {
|
|
console.error('Failed to parse Markdown:', error);
|
|
return '';
|
|
}
|
|
};
|
|
export default parseMarkdown;
|
|
// Generation time: 8.849s
|
|
// Result: PASS
|