diff --git a/packages/integrations/mdx/src/index.ts b/packages/integrations/mdx/src/index.ts index 33286b2e2..e7a896d18 100644 --- a/packages/integrations/mdx/src/index.ts +++ b/packages/integrations/mdx/src/index.ts @@ -1,4 +1,3 @@ -import type { Options as RemarkRehypeOptions } from 'remark-rehype'; import { compile as mdxCompile } from '@mdx-js/mdx'; import { PluggableList } from '@mdx-js/mdx/lib/core.js'; import mdxPlugin, { Options as MdxRollupPluginOptions } from '@mdx-js/rollup'; @@ -6,6 +5,7 @@ import type { AstroIntegration } from 'astro'; import { parse as parseESM } from 'es-module-lexer'; import { blue, bold } from 'kleur/colors'; import fs from 'node:fs/promises'; +import type { Options as RemarkRehypeOptions } from 'remark-rehype'; import { VFile } from 'vfile'; import type { Plugin as VitePlugin } from 'vite'; import { diff --git a/packages/integrations/mdx/test/mdx-astro-markdown-remarkRehype.test.js b/packages/integrations/mdx/test/mdx-astro-markdown-remarkRehype.test.js index 778849207..ddcce4ba5 100644 --- a/packages/integrations/mdx/test/mdx-astro-markdown-remarkRehype.test.js +++ b/packages/integrations/mdx/test/mdx-astro-markdown-remarkRehype.test.js @@ -30,12 +30,14 @@ describe('MDX with Astro Markdown remark-rehype config', () => { it('Renders footnotes with values from custom configuration extending the default', async () => { const fixture = await loadFixture({ root: new URL('./fixtures/mdx-astro-markdown-remarkRehype/', import.meta.url), - integrations: [mdx({ - remarkRehype: { - footnoteLabel: 'Catatan kaki', - footnoteBackLabel: 'Kembali ke konten', - }, - })], + integrations: [ + mdx({ + remarkRehype: { + footnoteLabel: 'Catatan kaki', + footnoteBackLabel: 'Kembali ke konten', + }, + }), + ], markdown: { remarkRehype: { footnoteBackLabel: 'Replace me', @@ -56,12 +58,14 @@ describe('MDX with Astro Markdown remark-rehype config', () => { it('Renders footnotes with values from custom configuration without extending the default', async () => { const fixture = await loadFixture({ root: new URL('./fixtures/mdx-astro-markdown-remarkRehype/', import.meta.url), - integrations: [mdx({ - extendPlugins: 'astroDefaults', - remarkRehype: { - footnoteLabel: 'Catatan kaki', - }, - })], + integrations: [ + mdx({ + extendPlugins: 'astroDefaults', + remarkRehype: { + footnoteLabel: 'Catatan kaki', + }, + }), + ], markdown: { remarkRehype: { footnoteBackLabel: 'Kembali ke konten',