chore: ignore emojis too from anchors

pull/4566/head
Divyansh Singh 7 months ago
parent 68dff2af85
commit f6243d1f3f

@ -265,8 +265,8 @@ export async function createMarkdownRenderer(
slugify, slugify,
getTokensText: (tokens) => { getTokensText: (tokens) => {
return tokens return tokens
.filter((token) => token.type !== 'html_inline') .filter((t) => !['html_inline', 'emoji'].includes(t.type))
.map((token) => token.content) .map((t) => t.content)
.join('') .join('')
}, },
permalink: anchorPlugin.permalink.linkInsideHeader({ permalink: anchorPlugin.permalink.linkInsideHeader({

Loading…
Cancel
Save