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,5 @@
async function parseMarkdown(md) {
const { marked } = await import('https://cdn.jsdelivr.net/npm/marked@11.1.1/+esm');
return marked.parse(md);
}
export default parseMarkdown;

View File

@@ -0,0 +1,5 @@
async function parseMarkdown(md) {
const { marked } = await import('https://cdn.jsdelivr.net/npm/marked@11.1.1/+esm');
return marked.parse(md);
}
export default parseMarkdown;

View File

@@ -0,0 +1,5 @@
async function parseMarkdown(md) {
const { marked } = await import('https://cdn.jsdelivr.net/npm/marked@11.1.1/+esm');
return marked.parse(md);
}
export default parseMarkdown;

View File

@@ -0,0 +1,5 @@
const parseMarkdown = async (md) => {
const { marked } = await import('https://cdn.jsdelivr.net/npm/marked@5/+esm');
return marked.parse(md);
};
export default parseMarkdown;

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;

View File

@@ -0,0 +1,11 @@
async function parseMarkdown(markdown) {
const {marked} = await import('https://cdn.jsdelivr.net/npm/marked@12.0.2/lib/marked.esm.js')
marked.setOptions({
gfm:true,
breaks:false,
headerIds:true,
mangle:false
})
return marked.parse(String(markdown ?? ''))
}
export default parseMarkdown;