Closed crutchcorn closed 2 years ago
What behavior are you expecting to happen here? I can't tell from the linked code.
What I'd personally expect is the following:
plaintext
automatically whenever the language doesn't exist instead of throwing an error and crashing the serverplaintext
"100% agree with @Princesseuh in her expected behavior. This is what the ""upstream"" remark-shiki-twoslash
plugin does.
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:
error Failed to parse Markdown file "C:\Users\crutchcorn\git\Astro\unicorn-astro\content\blog\how-computers-speak\index.md": No language registration for nasm at getGrammar (C:\Users\crutchcorn\git\Astro\unicorn-astro\node_modules\shiki\dist\index.js:2175:19) at codeToThemedTokens (C:\Users\crutchcorn\git\Astro\unicorn-astro\node_modules\shiki\dist\index.js:2184:30) at Object.codeToHtml (C:\Users\crutchcorn\git\Astro\unicorn-astro\node_modules\shiki\dist\index.js:2201:24) at file:///C:/Users/crutchcorn/git/Astro/unicorn-astro/node_modules/@astrojs/markdown-remark/dist/remark-shiki.js:17:30 at overload (file:///C:/Users/crutchcorn/git/Astro/unicorn-astro/node_modules/unist-util-visit/index.js:50:16) at node (code) (file:///C:/Users/crutchcorn/git/Astro/unicorn-astro/node_modules/unist-util-visit-parents/index.js:104:31) at node (root) (file:///C:/Users/crutchcorn/git/Astro/unicorn-astro/node_modules/unist-util-visit-parents/index.js:121:79) at visitParents (file:///C:/Users/crutchcorn/git/Astro/unicorn-astro/node_modules/unist-util-visit-parents/index.js:61:30) at visit (file:///C:/Users/crutchcorn/git/Astro/unicorn-astro/node_modules/unist-util-visit/index.js:42:7) at file:///C:/Users/crutchcorn/git/Astro/unicorn-astro/node_modules/@astrojs/markdown-remark/dist/remark-shiki.js:16:5 (x2)