Closed feryardiant closed 5 months ago
Recently I realized that the issue is actually on my markdown-it-anchor
configuration that causing the issue. Previously, In one of my project my vite.config.ts
is something like this
// vite.config.ts
import mdAnchor from 'markdown-it-anchor'
markdownItSetup(md) {
md.use(mdAnchor, {
permalink: mdAnchor.permalink.ariaHidden({
renderAttrs: () => ({ 'aria-hidden': 'true' }),
space: false,
symbol: '🔗',
}),
})
}
Once I remove renderAttrs
option and the issue is gone
// vite.config.ts
import mdAnchor from 'markdown-it-anchor'
markdownItSetup(md) {
md.use(mdAnchor, {
permalink: mdAnchor.permalink.ariaHidden({
space: false,
symbol: '🔗',
}),
})
}
Describe the bug
Just recently migrated from
vite-plugin-md
to this plugin, and got an issue that quite confusing to me, which is it's error when I have headings in the markdown file.Say we have this markdown file
Here's the output when running
pnpm dev
and here the output when running
pnpm build
Reproduction
https://github.com/creasico/creasico.github.io
System Info
Used Package Manager
pnpm
Validations