Skip to content

Commit f6243d1

Browse files
committed
chore: ignore emojis too from anchors
1 parent 68dff2a commit f6243d1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/node/markdown/markdown.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,8 @@ export async function createMarkdownRenderer(
265265
slugify,
266266
getTokensText: (tokens) => {
267267
return tokens
268-
.filter((token) => token.type !== 'html_inline')
269-
.map((token) => token.content)
268+
.filter((t) => !['html_inline', 'emoji'].includes(t.type))
269+
.map((t) => t.content)
270270
.join('')
271271
},
272272
permalink: anchorPlugin.permalink.linkInsideHeader({

0 commit comments

Comments
 (0)