Skip to content

Not working when using in mdx-js/mdx #7

Description

@HJZzzzz

This plugin is not working with 'compile' in mdx-js/mdx, but okay when using it with remark.
any idea?

const jsxCode = await compileMdx(mdxWithFakeImports, {
development: false,
remarkPlugins: [
...remarkPlugins,
(await import('remark-remove-comments')).default,
(
await import('remark-gfm')
).default, //remark plugin to support GFM (autolink literals, footnotes, strikethrough, tables, tasklists).
(await import('remark-frontmatter')).default,
],
rehypePlugins: [
// Support stuff like ```js App.js {1-5} active by passing it through.
function rehypeMetaAsAttributes() {
return (tree) => {
visit(tree, 'element', (node) => {
if (node.tagName === 'code' && node.data && node.data.meta) {
node.properties.meta = node.data.meta;
}
});
};
},
],
});

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions