mirror of
https://github.com/multipleof4/lynchmark.git
synced 2026-03-17 11:21:00 +00:00
Refactor: Remove stale benchmark outputs
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
const _mdLibs=globalThis.__mdLibs||=(()=> {
|
||||
const md="https://cdn.jsdelivr.net/npm/markdown-it@14.1.0/dist/markdown-it.min.mjs"
|
||||
const pur="https://cdn.jsdelivr.net/npm/dompurify@3.0.6/dist/purify.es.mjs"
|
||||
return Promise.all([import(md),import(pur)]).then(([{default:MarkdownIt},{default:DOMPurify}])=>({
|
||||
md:new MarkdownIt({html:false,linkify:true,breaks:false}),
|
||||
pur:DOMPurify
|
||||
}))
|
||||
})()
|
||||
|
||||
async function parseMarkdown(markdown){
|
||||
const {md,pur}=await _mdLibs
|
||||
const html=md.render(String(markdown??""))
|
||||
return pur.sanitize(html,{USE_PROFILES:{html:true}})
|
||||
}
|
||||
export default parseMarkdown;
|
||||
// Generation time: 22.022s
|
||||
// Result: FAIL
|
||||
@@ -1,8 +0,0 @@
|
||||
async function parseMarkdown(s){
|
||||
const MarkdownIt = (await import('https://cdn.jsdelivr.net/npm/markdown-it@13.0.1/dist/markdown-it.esm.js')).default;
|
||||
const md = new MarkdownIt({html:false,linkify:true,typographer:true});
|
||||
return md.render(s);
|
||||
}
|
||||
export default parseMarkdown;
|
||||
// Generation time: 1.373s
|
||||
// Result: FAIL
|
||||
@@ -1,7 +0,0 @@
|
||||
const parseMarkdown = async md => {
|
||||
const { parse } = await import('https://esm.sh/marked')
|
||||
return parse(md)
|
||||
}
|
||||
export default parseMarkdown;
|
||||
// Generation time: 137.282s
|
||||
// Result: PASS
|
||||
Reference in New Issue
Block a user