export const renderer = {
heading(text: string, level: string) {
const escapedText = text.toLowerCase().replace(/[^\w]+/g, '-')
return `
${text}
`
},
image(href: string, title: string, text: string) {
const figcaption = title ? `${title}` : ''
const isLocal = !href.startsWith('http')
const src = isLocal ? `${href}?nf_resize=fit&h=640&w=640` : href
return `
${figcaption}
`
},
}