Revert previous mdx breaking change (#6252)
This commit is contained in:
parent
2ace02ece9
commit
0fbcf838a7
3 changed files with 6 additions and 2 deletions
5
.changeset/afraid-rivers-camp.md
Normal file
5
.changeset/afraid-rivers-camp.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
'@astrojs/mdx': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Revert previous breaking change
|
|
@ -74,7 +74,6 @@ export default function mdx(partialMdxOptions: Partial<MdxOptions> = {}): AstroI
|
||||||
const { data: frontmatter, content: pageContent } = parseFrontmatter(code, id);
|
const { data: frontmatter, content: pageContent } = parseFrontmatter(code, id);
|
||||||
const compiled = await mdxCompile(new VFile({ value: pageContent, path: id }), {
|
const compiled = await mdxCompile(new VFile({ value: pageContent, path: id }), {
|
||||||
...mdxPluginOpts,
|
...mdxPluginOpts,
|
||||||
elementAttributeNameCase: 'html',
|
|
||||||
remarkPlugins: [
|
remarkPlugins: [
|
||||||
// Ensure `data.astro` is available to all remark plugins
|
// Ensure `data.astro` is available to all remark plugins
|
||||||
toRemarkInitializeAstroData({ userFrontmatter: frontmatter }),
|
toRemarkInitializeAstroData({ userFrontmatter: frontmatter }),
|
||||||
|
|
|
@ -63,7 +63,7 @@ describe('MDX plugins', () => {
|
||||||
expect(selectRehypeExample(document)).to.not.be.null;
|
expect(selectRehypeExample(document)).to.not.be.null;
|
||||||
});
|
});
|
||||||
|
|
||||||
it('supports custom rehype plugins with namespaced attributes', async () => {
|
it.skip('supports custom rehype plugins with namespaced attributes', async () => {
|
||||||
const fixture = await buildFixture({
|
const fixture = await buildFixture({
|
||||||
integrations: [
|
integrations: [
|
||||||
mdx({
|
mdx({
|
||||||
|
|
Loading…
Add table
Reference in a new issue