fix: toc cause error when used with heading (#605) (#674)

fix #605

Encode string returned by parseHeader.
pull/681/head
Divyansh Singh 3 years ago committed by GitHub
parent 7131a07b06
commit ae7c255aea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -95,7 +95,8 @@ export const createMarkdownRenderer = async (
.use(toc, { .use(toc, {
slugify, slugify,
level: [2, 3], level: [2, 3],
format: parseHeader, format: (x: string, htmlencode: (s: string) => string) =>
htmlencode(parseHeader(x)),
listType: 'ul', listType: 'ul',
...options.toc ...options.toc
}) })

Loading…
Cancel
Save