Docs: Update benchmark results

This commit is contained in:
github-actions[bot]
2025-11-07 21:32:49 +00:00
parent f9da7d4ed7
commit d0bc3b95dd
54 changed files with 1115 additions and 372 deletions

View File

@@ -0,0 +1,15 @@
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))
}
export default parseMarkdown;