Skip to content

Commit c5a8428

Browse files
committed
fix: html entities encoded twice in toc plugin
closes #4908
1 parent e25f228 commit c5a8428

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/node/markdown/markdown.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,7 @@ export async function createMarkdownRenderer(
320320
.use(titlePlugin)
321321
.use(tocPlugin, {
322322
slugify,
323+
format: (s) => s.replaceAll('&', '&'), // encoded twice because of restoreEntities
323324
...options.toc
324325
} as TocPluginOptions)
325326

0 commit comments

Comments
 (0)