🐛 BUG: Shiki missing language registration should not fail markdown processing #3881
Closed
1 task done
Labels
- P4: important
Violate documented behavior or significantly impacts performance (priority)
feat: markdown
Related to Markdown (scope)
What version of
astro
are you using?1.0.0-beta.65
Are you using an SSR adapter? If so, which one?
None
What package manager are you using?
npm
What operating system are you using?
Windows
Describe the Bug
When using Shiki, the following Markdown will fail:
With the following error:
As @Princesseuh pointed out on Discord, it seems like this behavior is thrown from Shiki itself
https://github.com/shikijs/shiki/blob/b0cade2f48f3d6e5c0897c81d0dd06c81f5916ab/packages/shiki/src/highlighter.ts#L108
But Shiki's official
remark
plugin seems to catch this error:https://github.com/shikijs/twoslash/blob/main/packages/remark-shiki-twoslash/src/index.ts#L167-L172
I think this should be the same behavior we seek to implement in Astro. Otherwise, it enables other's content to break a build, which seems to be too harsh of an action
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-nxlpqd?file=src%2Fpages%2Fposts%2Findex.md&on=stackblitz
Participation
The text was updated successfully, but these errors were encountered: