fix: html entities encoded twice in toc plugin

closes #4908
pull/4910/head
Divyansh Singh 1 month ago
parent e25f2285c0
commit 8abbe298d5

@ -320,7 +320,11 @@ export async function createMarkdownRenderer(
.use(titlePlugin) .use(titlePlugin)
.use(tocPlugin, { .use(tocPlugin, {
slugify, slugify,
...options.toc ...options.toc,
format: (s) => {
const title = s.replaceAll('&', '&') // encoded twice because of restoreEntities
return options.toc?.format?.(title) ?? title
}
} as TocPluginOptions) } as TocPluginOptions)
if (options.math) { if (options.math) {

Loading…
Cancel
Save