mirror of
https://github.com/multipleof4/lynchmark.git
synced 2026-01-14 00:27:55 +00:00
Docs: Update benchmark results
This commit is contained in:
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
15
tests/5_markdown_parser/outputs/openai_gpt-5-codex.js
Normal file
15
tests/5_markdown_parser/outputs/openai_gpt-5-codex.js
Normal 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;
|
||||
11
tests/5_markdown_parser/outputs/openrouter_polaris-alpha.js
Normal file
11
tests/5_markdown_parser/outputs/openrouter_polaris-alpha.js
Normal 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;
|
||||
Reference in New Issue
Block a user