-
-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Assignees
@bismitpanda
Description
Whenever I add langALias to the @shikijs/rehype plugin, the build for the .mdx file containing a code block with the aliased language fails.
const blogs = defineCollection({ name: "blogs", directory: "content", include: "blogs/*.mdx", schema: blogSchema, transform: async (_data, context) => { // Other ops const html = await compileMDX(context, data, { remarkPlugins: [ remarkMath, remarkGemoji, [remarkGfm, { singleTilde: false }], ], rehypePlugins: [ rehypeSlug, [rehypeAutolinkHeadings, { behavior: "wrap" }], rehypeKatex, [ rehypeShiki, { theme: "material-theme-darker", transformers: [ transformerNotationDiff(), transformerNotationHighlight(), transformerNotationFocus(), transformerNotationErrorLevel(), { pre(hast) { hast.properties["data-meta"] = this.options.meta?.__raw; hast.properties["data-code"] = this.source; hast.properties["data-language"] = this.options.lang; }, code(hast) { hast.properties["data-line-numbers-max-digits"] = this.lines.length.toString().length; }, } satisfies ShikiTransformer, ], inline: "tailing-curly-colon", langAlias: { "file-tree": "plain", // this fails if used }, }, ], ], }); return { ...data, html, }; }, });
## A file tree example ```file-tree \```
I have 2 mdx files, but the one where file-tree lang is used, fails
Metadata
Metadata
Assignees
Labels
No labels