Docs: Update benchmark results

This commit is contained in:
github-actions[bot]
2025-11-07 22:07:45 +00:00
parent b5f81c6e8a
commit 1687dca49c
42 changed files with 784 additions and 847 deletions

View File

@@ -1,15 +1,6 @@
let md,pd
const getMd=()=>md||(md=import('https://cdn.jsdelivr.net/npm/marked@12.0.2/+esm').then(x=>{
let m=x.marked||x.default
m.setOptions?.({gfm:true,breaks:true,smartypants:true})
return s=>m.parse?m.parse(s):m(s)
}))
const getPurify=()=>pd||(pd=import('https://esm.sh/dompurify@3?target=es2020').then(x=>{
let d=x.default||x.DOMPurify||x
return typeof d.sanitize=='function'?d:d(window)
}))
async function parseMarkdown(s){
let [render,pur]=await Promise.all([getMd(),getPurify()])
return pur.sanitize(render(s))
}
const parseMarkdown=async t=>{
parseMarkdown.l??=import('https://cdn.jsdelivr.net/npm/marked@12.0.2/lib/marked.esm.js');
const{marked}=await parseMarkdown.l;
return marked.parse(t||'');
};
export default parseMarkdown;