mirror of
https://github.com/lynchmarkHQ/lynchmark.com.git
synced 2026-10-17 17:27:53 +00:00
10 lines
268 B
JavaScript
10 lines
268 B
JavaScript
export const parseMarkdown = async (str) => {
|
|
const ref = parseMarkdown;
|
|
ref.lib ||= (await import('https://esm.sh/marked@12.0.1')).marked;
|
|
return ref.lib.parse(str || '', {
|
|
async: false,
|
|
gfm: true,
|
|
breaks: true
|
|
});
|
|
};
|
|
export default parseMarkdown; |